public class DefaultDisconnectHandler extends java.lang.Object implements ClientDisconnectHandler, TransportDisconnectHandler
ClientDisconnectHandler
and
TransportDisconnectHandler
interfaces that does nothing.Modifier and Type | Field and Description |
---|---|
static DefaultDisconnectHandler |
instance |
Modifier and Type | Method and Description |
---|---|
void |
invoke(Client client)
When the Client unintentionally disconnects from AMPS, this method is
invoked.
|
void |
invoke(Transport transport,
java.lang.Exception e_)
Called by the Transport whenever the underlying socket is disconnected.
|
void |
preInvoke(int version)
Called before invoke by the transport with a monotonically increasing "connection version" integer
that is incremented upon each reconnect.
|
public static final DefaultDisconnectHandler instance
public void invoke(Client client)
ClientDisconnectHandler
invoke
in interface ClientDisconnectHandler
client
- The client that unintentionally disconnected from AMPS.public void invoke(Transport transport, java.lang.Exception e_)
TransportDisconnectHandler
invoke
in interface TransportDisconnectHandler
transport
- The calling transport that was disconnected.e_
- The cause of the disconnect.public void preInvoke(int version)
TransportDisconnectHandler
preInvoke
in interface TransportDisconnectHandler
version
- The integer that is incremented upon each reconnect.