Package org.apache.qpid.protonj2.client
Class DisconnectionEvent
- java.lang.Object
-
- org.apache.qpid.protonj2.client.DisconnectionEvent
-
public class DisconnectionEvent extends java.lang.ObjectAn event object that accompanies events fired to handlers configured in theConnectionOptionswhich are signaled during specificConnectionlife-cycle stages.
-
-
Constructor Summary
Constructors Constructor Description DisconnectionEvent(java.lang.String host, int port, ClientIOException failureCause)Creates the event object with all immutable data provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientIOExceptionfailureCause()Gets the failure cause that is associated with this event if the event indicates an error stage in theConnectionlife-cycle such as a connection being interrupted which might later be recovered or a failure to establish or reconnect a previously establishedConnection.java.lang.Stringhost()Gets the host that is associated with this event which for a successfulConnectionevent would be the currently active host and for an interrupted or failed Connection this host would indicate the host where theConnectionhad previously been established.intport()Gets the port that is associated with this event which for a successfulConnectionevent would be the currently active port and for an interrupted or failed Connection this port would indicate the host where theConnectionhad previously been established.
-
-
-
Constructor Detail
-
DisconnectionEvent
public DisconnectionEvent(java.lang.String host, int port, ClientIOException failureCause)Creates the event object with all immutable data provided.- Parameters:
host- the host that is associated with thisDisconnectionEventport- the port that is associated with thisDisconnectionEventfailureCause- the failure cause that is associated with thisDisconnectionEvent
-
-
Method Detail
-
host
public java.lang.String host()
Gets the host that is associated with this event which for a successfulConnectionevent would be the currently active host and for an interrupted or failed Connection this host would indicate the host where theConnectionhad 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 successfulConnectionevent would be the currently active port and for an interrupted or failed Connection this port would indicate the host where theConnectionhad 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 theConnectionlife-cycle such as a connection being interrupted which might later be recovered or a failure to establish or reconnect a previously establishedConnection.- Returns:
- the failureCause that is associated with this
DisconnectionEvent
-
-