Package org.atmosphere.cpr
Class AtmosphereResourceEventListenerAdapter
java.lang.Object
org.atmosphere.cpr.AtmosphereResourceEventListenerAdapter
- All Implemented Interfaces:
AtmosphereResourceEventListener,AtmosphereResourceHeartbeatEventListener
- Direct Known Subclasses:
AtmosphereResourceEventListenerAdapter.OnBroadcast,AtmosphereResourceEventListenerAdapter.OnClose,AtmosphereResourceEventListenerAdapter.OnDisconnect,AtmosphereResourceEventListenerAdapter.OnHeartbeat,AtmosphereResourceEventListenerAdapter.OnPreSuspend,AtmosphereResourceEventListenerAdapter.OnResume,AtmosphereResourceEventListenerAdapter.OnSuspend,AtmosphereResourceEventListenerAdapter.OnThrowable,PaddingAtmosphereInterceptor.ForcePreSuspend
public class AtmosphereResourceEventListenerAdapter
extends Object
implements AtmosphereResourceEventListener
An implementation of
AtmosphereResourceEventListener which just log events with log level TRACE.- Author:
- Jeanfrancois Arcand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOn Broadcast's Listenerstatic classOn Close's Listenerstatic classOn Disconnect's Listenerstatic classOn Heartbeat's Listenerstatic classOn PreSuspend's Listenerstatic classOn Resume's Listenerstatic classOn Suspend's Listenerstatic classOn Throwable's Listener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when aBroadcaster.broadcast(java.lang.Object)occurs.voidonClose(AtmosphereResourceEvent event) Invoked whenAtmosphereResource.close()gets called.voidInvoked when the remote connection gets closed.voidInvoked when the remote connections send a heartbeat.voidInvoked 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
-
AtmosphereResourceEventListenerAdapter
public AtmosphereResourceEventListenerAdapter()
-
-
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
-
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
-