Package org.apache.qpid.protonj2.client
Class ConnectionEvent
- java.lang.Object
-
- org.apache.qpid.protonj2.client.ConnectionEvent
-
public class ConnectionEvent extends Object
An event object that accompanies events fired to handlers configured in theConnectionOptions
which are signaled during specificConnection
event points.
-
-
Constructor Summary
Constructors Constructor Description ConnectionEvent(String host, int port)
Creates the event object with all immutable data provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
host()
Gets the host that is associated with this event which for a successfulConnection
event would be the currently active host and for an interrupted or failed Connection this host would indicate the host where theConnection
had previously been established.int
port()
Gets the port that is associated with this event which for a successfulConnection
event would be the currently active port and for an interrupted or failed Connection this port would indicate the host where theConnection
had previously been established.
-
-
-
Constructor Detail
-
ConnectionEvent
public ConnectionEvent(String host, int port)
Creates the event object with all immutable data provided.- Parameters:
host
- the host that is associated with thisConnectionEvent
port
- the port that is associated with thisConnectionEvent
-
-
Method Detail
-
host
public String host()
Gets the host that is associated with this event which for a successfulConnection
event would be the currently active host and for an interrupted or failed Connection this host would indicate the host where theConnection
had previously been established.- Returns:
- the host that is associated with this
ConnectionEvent
-
port
public int port()
Gets the port that is associated with this event which for a successfulConnection
event would be the currently active port and for an interrupted or failed Connection this port would indicate the host where theConnection
had previously been established.- Returns:
- the port that is associated with this
ConnectionEvent
-
-