Package org.atmosphere.websocket
Class WebSocketEventListenerAdapter
java.lang.Object
org.atmosphere.websocket.WebSocketEventListenerAdapter
- All Implemented Interfaces:
AtmosphereResourceEventListener,AtmosphereResourceHeartbeatEventListener,WebSocketEventListener
An implementation of
WebSocketEventListener with just log event as trace.- Author:
- Jeanfrancois Arcand
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.websocket.WebSocketEventListener
WebSocketEventListener.WebSocketEvent<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when aBroadcaster.broadcast(java.lang.Object)occurs.voidonClose(AtmosphereResourceEvent event) Invoked whenAtmosphereResource.close()gets called.voidonClose(WebSocketEventListener.WebSocketEvent<?> event) When the close occursvoidWhen the connect occursvoidWhen the control occursvoidInvoked when the remote connection gets closed.voidWhen the disconnect occursvoidWhen the hanshake occursvoidInvoked when the remote connections send a heartbeat.voidWhen a message is sentvoidInvoked when theAtmosphereResource.suspend()is in the process of being suspended but nothing has yet been written on the connection.voidonResume(AtmosphereResourceEvent event) Invoked when theAtmosphereResource.resume()is invoked or when the suspend's time out expires.voidonSuspend(AtmosphereResourceEvent event) Invoked when theAtmosphereResource.suspend()has been completed and the response is considered as suspended.voidInvoked when an operations failed to execute for an unknown reason (eg.
-
Constructor Details
-
WebSocketEventListenerAdapter
public WebSocketEventListenerAdapter()
-
-
Method Details
-
onPreSuspend
Description copied from interface:AtmosphereResourceEventListenerInvoked when theAtmosphereResource.suspend()is in the process of being suspended but nothing has yet been written on the connection. An implementation could configure the request's headers, flush some data, etc. during that stage.- Specified by:
onPreSuspendin interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onHandshake
Description copied from interface:WebSocketEventListenerWhen the hanshake occurs- Specified by:
onHandshakein interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onMessage
Description copied from interface:WebSocketEventListenerWhen a message is sent- Specified by:
onMessagein interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onClose
Description copied from interface:WebSocketEventListenerWhen the close occurs- Specified by:
onClosein interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onControl
Description copied from interface:WebSocketEventListenerWhen the control occurs- Specified by:
onControlin interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onDisconnect
Description copied from interface:WebSocketEventListenerWhen the disconnect occurs- Specified by:
onDisconnectin interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onConnect
Description copied from interface:WebSocketEventListenerWhen the connect occurs- Specified by:
onConnectin interfaceWebSocketEventListener- Parameters:
event-WebSocketEventListener.WebSocketEvent
-
onSuspend
Description copied from interface:AtmosphereResourceEventListenerInvoked when theAtmosphereResource.suspend()has been completed and the response is considered as suspended.- Specified by:
onSuspendin interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onResume
Description copied from interface:AtmosphereResourceEventListenerInvoked when theAtmosphereResource.resume()is invoked or when the suspend's time out expires.- Specified by:
onResumein interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onHeartbeat
Description copied from interface:AtmosphereResourceHeartbeatEventListenerInvoked when the remote connections send a heartbeat.- Specified by:
onHeartbeatin interfaceAtmosphereResourceHeartbeatEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onDisconnect
Description copied from interface:AtmosphereResourceEventListenerInvoked when the remote connection gets closed.- Specified by:
onDisconnectin interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onBroadcast
Description copied from interface:AtmosphereResourceEventListenerInvoked when aBroadcaster.broadcast(java.lang.Object)occurs.- Specified by:
onBroadcastin interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onThrowable
Description copied from interface:AtmosphereResourceEventListenerInvoked when an operations failed to execute for an unknown reason (eg. IOException because the client remotely closed the connection, a broken connection, etc.).- Specified by:
onThrowablein interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-
onClose
Description copied from interface:AtmosphereResourceEventListenerInvoked whenAtmosphereResource.close()gets called.- Specified by:
onClosein interfaceAtmosphereResourceEventListener- Parameters:
event- aAtmosphereResourceEvent
-