Package org.atmosphere.cpr
Interface AtmosphereResourceEventListener
- All Superinterfaces:
AtmosphereResourceHeartbeatEventListener
- All Known Subinterfaces:
WebSocketEventListener
- All Known Implementing Classes:
AtmosphereResourceEventListenerAdapter,AtmosphereResourceEventListenerAdapter.OnBroadcast,AtmosphereResourceEventListenerAdapter.OnClose,AtmosphereResourceEventListenerAdapter.OnDisconnect,AtmosphereResourceEventListenerAdapter.OnHeartbeat,AtmosphereResourceEventListenerAdapter.OnPreSuspend,AtmosphereResourceEventListenerAdapter.OnResume,AtmosphereResourceEventListenerAdapter.OnSuspend,AtmosphereResourceEventListenerAdapter.OnThrowable,AtmosphereResourceStateRecovery.OnAlwaysSuspend,PaddingAtmosphereInterceptor.ForcePreSuspend,WebSocketEventListenerAdapter
Receive notifications when resume, client disconnect or broadcast events occur. Also extends
AtmosphereResourceHeartbeatEventListener which is notified when heartbeat events occur.- Author:
- Jeanfrancois Arcand
-
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 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.Methods inherited from interface org.atmosphere.cpr.AtmosphereResourceHeartbeatEventListener
onHeartbeat
-
Method Details
-
onPreSuspend
Invoked 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.- Parameters:
event- aAtmosphereResourceEvent
-
onSuspend
Invoked when theAtmosphereResource.suspend()has been completed and the response is considered as suspended.- Parameters:
event- aAtmosphereResourceEvent
-
onResume
Invoked when theAtmosphereResource.resume()is invoked or when the suspend's time out expires.- Parameters:
event- aAtmosphereResourceEvent
-
onDisconnect
Invoked when the remote connection gets closed.- Parameters:
event- aAtmosphereResourceEvent
-
onBroadcast
Invoked when aBroadcaster.broadcast(java.lang.Object)occurs.- Parameters:
event- aAtmosphereResourceEvent
-
onThrowable
Invoked when an operations failed to execute for an unknown reason (eg. IOException because the client remotely closed the connection, a broken connection, etc.).- Parameters:
event- aAtmosphereResourceEvent
-
onClose
Invoked whenAtmosphereResource.close()gets called.- Parameters:
event- aAtmosphereResourceEvent
-