Class DisconnectionEvent

java.lang.Object
org.apache.qpid.protonj2.client.DisconnectionEvent

public class DisconnectionEvent extends Object
An event object that accompanies events fired to handlers configured in the ConnectionOptions which are signaled during specific Connection life-cycle stages.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DisconnectionEvent(String host, int port, ClientIOException failureCause)
    Creates the event object with all immutable data provided.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the failure cause that is associated with this event if the event indicates an error stage in the Connection life-cycle such as a connection being interrupted which might later be recovered or a failure to establish or reconnect a previously established Connection.
    Gets the host that is associated with this event which for a successful Connection event would be the currently active host and for an interrupted or failed Connection this host would indicate the host where the Connection had previously been established.
    int
    Gets the port that is associated with this event which for a successful Connection event would be the currently active port and for an interrupted or failed Connection this port would indicate the host where the Connection had previously been established.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DisconnectionEvent

      public DisconnectionEvent(String host, int port, ClientIOException failureCause)
      Creates the event object with all immutable data provided.
      Parameters:
      host - the host that is associated with this DisconnectionEvent
      port - the port that is associated with this DisconnectionEvent
      failureCause - the failure cause that is associated with this DisconnectionEvent
  • Method Details

    • host

      public String host()
      Gets the host that is associated with this event which for a successful Connection event would be the currently active host and for an interrupted or failed Connection this host would indicate the host where the Connection had previously been established.
      Returns:
      the host that is associated with this DisconnectionEvent
    • port

      public int port()
      Gets the port that is associated with this event which for a successful Connection event would be the currently active port and for an interrupted or failed Connection this port would indicate the host where the Connection had previously been established.
      Returns:
      the port that is associated with this DisconnectionEvent
    • failureCause

      public ClientIOException failureCause()
      Gets the failure cause that is associated with this event if the event indicates an error stage in the Connection life-cycle such as a connection being interrupted which might later be recovered or a failure to establish or reconnect a previously established Connection.
      Returns:
      the failureCause that is associated with this DisconnectionEvent