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
public interface AtmosphereResourceEventListener extends AtmosphereResourceHeartbeatEventListener
Receive notifications when resume, client disconnect or broadcast events occur. Also extendsAtmosphereResourceHeartbeatEventListenerwhich is notified when heartbeat events occur.- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonBroadcast(AtmosphereResourceEvent event)Invoked when aBroadcaster.broadcast(java.lang.Object)occurs.voidonClose(AtmosphereResourceEvent event)Invoked whenAtmosphereResource.close()gets called.voidonDisconnect(AtmosphereResourceEvent event)Invoked when the remote connection gets closed.voidonPreSuspend(AtmosphereResourceEvent event)Invoked 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.voidonThrowable(AtmosphereResourceEvent event)Invoked when an operations failed to execute for an unknown reason (eg.-
Methods inherited from interface org.atmosphere.cpr.AtmosphereResourceHeartbeatEventListener
onHeartbeat
-
-
-
-
Method Detail
-
onPreSuspend
void onPreSuspend(AtmosphereResourceEvent event)
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
void onSuspend(AtmosphereResourceEvent event)
Invoked when theAtmosphereResource.suspend()has been completed and the response is considered as suspended.- Parameters:
event- aAtmosphereResourceEvent
-
onResume
void onResume(AtmosphereResourceEvent event)
Invoked when theAtmosphereResource.resume()is invoked or when the suspend's time out expires.- Parameters:
event- aAtmosphereResourceEvent
-
onDisconnect
void onDisconnect(AtmosphereResourceEvent event)
Invoked when the remote connection gets closed.- Parameters:
event- aAtmosphereResourceEvent
-
onBroadcast
void onBroadcast(AtmosphereResourceEvent event)
Invoked when aBroadcaster.broadcast(java.lang.Object)occurs.- Parameters:
event- aAtmosphereResourceEvent
-
onThrowable
void onThrowable(AtmosphereResourceEvent event)
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
void onClose(AtmosphereResourceEvent event)
Invoked whenAtmosphereResource.close()gets called.- Parameters:
event- aAtmosphereResourceEvent
-
-