com.jscape.inet.smtp

## Interface SmtpListener

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

      public interface SmtpListener
      extends java.util.EventListener

  Implements methods for capturing events sourced from Smtp class. Typicaly your application will implement this interface to capture the following events :
  `SmtpConnectedEvent`
  `SmtpDisconnectedEvent`
  `SmtpCommandEvent`
  `SmtpCommandEvent`

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

       public class Application ... implements SmtpListener
       {
        ...
        public ... initMethod(...)
        {
          Smtp smtp = new Smtp();
          smtp.addSmtpListener(this);
        }
        ...
       }

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commandSent(SmtpCommandEvent event)` Invoked when command is sent to the SMTP server
    `void` | `connected(SmtpConnectedEvent event)` Invoked when connection to SMTP server is established.
    `void` | `disconnected(SmtpDisconnectedEvent event)` Invoked when connection to SMTP server is released.
    `void` | `responseReceived(SmtpResponseEvent event)` Invoked when a response is received from SMTP server

- - ### Method Detail

    - #### connected

          void connected(SmtpConnectedEvent event)

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

    - #### disconnected

          void disconnected(SmtpDisconnectedEvent event)

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

    - #### commandSent

          void commandSent(SmtpCommandEvent event)

      Invoked when command is sent to the SMTP server
      Parameters:
        `event` - a `SmtpCommandEvent`
      See Also:
        `SmtpCommandEvent`

    - #### responseReceived

          void responseReceived(SmtpResponseEvent event)

      Invoked when a response is received from SMTP server
      Parameters:
        `event` - a `SmtpResponseEvent`
      See Also:
        `SmtpResponseEvent`

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