com.jscape.inet.nntp

## Interface NntpListener

- All Superinterfaces:
    java.util.EventListener
  All Known Implementing Classes:
    NntpAdapter

      public interface NntpListener
      extends java.util.EventListener

  Implements methods for capturing events sourced from Nntp bean. Typicaly your application will implement this interface to capture following events :
  NntpConnectedEvent
  NntpDisconnectedEvent
  NntpArticlePostedEvent
  NntpArticleEvent
  NntpArticleHeaderEvent
  NntpProgressEvent

  In addition to implementing this interface your application should register itself as a EventListener which may look somewhat like this:

       ...
       public class Application ... implements NntpListener{
        ...
        String host;
        int port;
        ...
        public ... initMethod(...){
          ...
          Nntp nntp = new Nntp(host,port);
          nntp.addNntpListener(this);
          ...
        }
        ...
       }

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `articleHeaderRetrieved(NntpArticleHeaderEvent event)` Invoked when an article header is retrieved from NNTP server.
    `void` | `articlePosted(NntpArticlePostedEvent event)` Invoked when an article is posted to NNTP server.
    `void` | `articleRetrieved(NntpArticleEvent event)` Invoked when an article is retrieved from NNTP server.
    `void` | `connected(NntpConnectedEvent event)` Invoked when connection to NNTP server is established.
    `void` | `disconnected(NntpDisconnectedEvent event)` Invoked when connection to NNTP server is released.
    `void` | `progress(NntpProgressEvent event)` Invoked when performing lengthy Nntp operations.

- - ### Method Detail

    - #### connected

          void connected(NntpConnectedEvent event)

      Invoked when connection to NNTP server is established.
      Parameters:
        `event` - a `NntpConnectedEvent`
      See Also:
        `NntpConnectedEvent`

    - #### disconnected

          void disconnected(NntpDisconnectedEvent event)

      Invoked when connection to NNTP server is released.
      Parameters:
        `event` - a `NntpDisconnectedEvent`
      See Also:
        `NntpDisconnectedEvent`

    - #### articlePosted

          void articlePosted(NntpArticlePostedEvent event)

      Invoked when an article is posted to NNTP server.
      Parameters:
        `event` - a `NntpArticlePostedEvent`
      See Also:
        `NntpArticlePostedEvent`

    - #### articleRetrieved

          void articleRetrieved(NntpArticleEvent event)

      Invoked when an article is retrieved from NNTP server.
      Parameters:
        `event` - a `NntpArticleEvent`
      See Also:
        `NntpArticleEvent`

    - #### articleHeaderRetrieved

          void articleHeaderRetrieved(NntpArticleHeaderEvent event)

      Invoked when an article header is retrieved from NNTP server.
      Parameters:
        `event` - a `NntpArticleHeaderEvent`
      See Also:
        `NntpArticleHeaderEvent`

    - #### progress

          void progress(NntpProgressEvent event)

      Invoked when performing lengthy Nntp operations. For example: retrieving a long list of groups or headers.
      Parameters:
        `event` - a `NntpProgressEvent`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved