|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasynctcp.Connection
asynctcp.IncomingConnection
public class IncomingConnection
An interface allowing management of remotely established connections.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class asynctcp.Connection |
---|
Connection.ConnectionState |
Method Summary | |
---|---|
boolean |
isLocalConnection()
Returns whether this connection was locally or remotely established. |
Connection.ConnectionState |
reconnect(long timeout_ms)
If this connection was established locally, meaning isLocalConnection returns true , then this
method attempts to reestablish the connection. |
Methods inherited from class asynctcp.Connection |
---|
attach, attachment, disconnect, getConnectionState, getListener, getMessageQueue, getRemoteHost, setListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isLocalConnection()
Connection
isLocalConnection
in class Connection
true
if this connection was locally established,
false
otherwisepublic Connection.ConnectionState reconnect(long timeout_ms)
Connection
isLocalConnection
returns true
, then this
method attempts to reestablish the connection. If the connection state is
currently DISCONNECTING
because the queue of this
connection is still being emptied, then invoking this method cancels the
disconnect and returns the state to CONNECTED
. If the
connection state is currently DISCONNECTED
, then this
method will begin establishing a new connection entirely, and change the
connection state to CONNECTING
. In any other state,
invoking this method has no effect.
If this connection was established remotely, and has a state of
DISCONNECTING
because it is still emptying its message
queue, then invoking this method simply cancels the disconnect and
returns the state to CONNECTED
. In any other state,
invoking this method has no effect.
reconnect
in class Connection
timeout_ms
- the maximum amount of time, in milliseconds, before it is assumed that
the connection attempt has failed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |