public class TransportStateEvent extends EventObject
TransportStateEvent
describes a state change for
a transport connection. Optionally, connection establishment can be
cancelled.Modifier and Type | Field and Description |
---|---|
static int |
STATE_CLOSED |
static int |
STATE_CONNECTED |
static int |
STATE_DISCONNECTED_REMOTELY |
static int |
STATE_DISCONNECTED_TIMEOUT |
static int |
STATE_UNKNOWN |
source
Constructor and Description |
---|
TransportStateEvent(TcpTransportMapping source,
Address peerAddress,
int newState,
IOException causingException) |
Modifier and Type | Method and Description |
---|---|
IOException |
getCausingException() |
int |
getNewState() |
Address |
getPeerAddress() |
boolean |
isCancelled()
Indicates whether this event has been canceled.
|
void |
setCancelled(boolean cancelled)
Sets the canceled state of the transport event.
|
String |
toString() |
getSource
public static final int STATE_UNKNOWN
public static final int STATE_CONNECTED
public static final int STATE_DISCONNECTED_REMOTELY
public static final int STATE_DISCONNECTED_TIMEOUT
public static final int STATE_CLOSED
public TransportStateEvent(TcpTransportMapping source, Address peerAddress, int newState, IOException causingException)
public IOException getCausingException()
public int getNewState()
public Address getPeerAddress()
public boolean isCancelled()
STATE_CONNECTED
events can be canceled.true
if the event has been canceled.public String toString()
toString
in class EventObject
public void setCancelled(boolean cancelled)
STATE_CONNECTED
events can be canceled.cancelled
- true
if the event should be canceled, i.e. a connection
attempt should be rejected.Copyright © 2015 SNMP4J.org. All Rights Reserved.