org.atmosphere.cpr
Class AtmosphereResourceEventListenerAdapter

java.lang.Object
  extended by 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
static class AtmosphereResourceEventListenerAdapter.OnBroadcast
          On Broadcast's Listener
static class AtmosphereResourceEventListenerAdapter.OnClose
          On Close's Listener
static class AtmosphereResourceEventListenerAdapter.OnDisconnect
          On Disconnect's Listener
static class AtmosphereResourceEventListenerAdapter.OnHeartbeat
          On Heartbeat's Listener
static class AtmosphereResourceEventListenerAdapter.OnPreSuspend
          On PreSuspend's Listener
static class AtmosphereResourceEventListenerAdapter.OnResume
          On Resume's Listener
static class AtmosphereResourceEventListenerAdapter.OnSuspend
          On Suspend's Listener
static class AtmosphereResourceEventListenerAdapter.OnThrowable
          On Throwable's Listener
 
Constructor Summary
AtmosphereResourceEventListenerAdapter()
           
 
Method Summary
 void onBroadcast(AtmosphereResourceEvent event)
          Invoked when a Broadcaster.broadcast(java.lang.Object) occurs.
 void onClose(AtmosphereResourceEvent event)
          Invoked when AtmosphereResource.close() gets called.
 void onDisconnect(AtmosphereResourceEvent event)
          Invoked when the remote connection gets closed.
 void onHeartbeat(AtmosphereResourceEvent event)
          Invoked when the remote connections send a heartbeat.
 void onPreSuspend(AtmosphereResourceEvent event)
          Invoked when the AtmosphereResource.suspend() is in the process of being suspended but nothing has yet been written on the connection.
 void onResume(AtmosphereResourceEvent event)
          Invoked when the AtmosphereResource.resume() is invoked or when the suspend's time out expires.
 void onSuspend(AtmosphereResourceEvent event)
          Invoked when the AtmosphereResource.suspend() has been completed and the response is considered as suspended.
 void onThrowable(AtmosphereResourceEvent event)
          Invoked when an operations failed to execute for an unknown reason (eg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtmosphereResourceEventListenerAdapter

public AtmosphereResourceEventListenerAdapter()
Method Detail

onPreSuspend

public void onPreSuspend(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when the AtmosphereResource.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:
onPreSuspend in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onSuspend

public void onSuspend(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when the AtmosphereResource.suspend() has been completed and the response is considered as suspended.

Specified by:
onSuspend in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onResume

public void onResume(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when the AtmosphereResource.resume() is invoked or when the suspend's time out expires.

Specified by:
onResume in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onHeartbeat

public void onHeartbeat(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceHeartbeatEventListener
Invoked when the remote connections send a heartbeat.

Specified by:
onHeartbeat in interface AtmosphereResourceHeartbeatEventListener
Parameters:
event - a AtmosphereResourceEvent

onDisconnect

public void onDisconnect(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when the remote connection gets closed.

Specified by:
onDisconnect in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onBroadcast

public void onBroadcast(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when a Broadcaster.broadcast(java.lang.Object) occurs.

Specified by:
onBroadcast in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onThrowable

public void onThrowable(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked 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:
onThrowable in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent

onClose

public void onClose(AtmosphereResourceEvent event)
Description copied from interface: AtmosphereResourceEventListener
Invoked when AtmosphereResource.close() gets called.

Specified by:
onClose in interface AtmosphereResourceEventListener
Parameters:
event - a AtmosphereResourceEvent


Copyright © 2014. All Rights Reserved.