public static class ClientManager.ReconnectHandler extends Object
Session.close()
call will be treated just like any other disconnect resulting in reconnect.Constructor and Description |
---|
ClientManager.ReconnectHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
onConnectFailure(Exception exception)
Called when there is a connection failure.
|
boolean |
onDisconnect(CloseReason closeReason)
Called after
OnClose annotated method (or Endpoint.onClose(javax.websocket.Session, javax.websocket.CloseReason)
is invoked. |
public boolean onDisconnect(CloseReason closeReason)
OnClose
annotated method (or Endpoint.onClose(javax.websocket.Session, javax.websocket.CloseReason)
is invoked.closeReason
- close reason passed to onClose method.true
is returned, client container will reconnect.public boolean onConnectFailure(Exception exception)
Exception
parameter. Be cautious when implementing this method,
you might easily cause DDoS like behaviour.exception
- Exception thrown during connection phase.true
is returned, client container will reconnect.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.