org.atmosphere.cpr
Interface AtmosphereResourceEventListener

All Known Subinterfaces:
WebSocketEventListener
All Known Implementing Classes:
AtmosphereResourceEventListenerAdapter, WebSocketEventListenerAdapter

public interface AtmosphereResourceEventListener

Receive notification when a resume, client disconnect or broadcast events occurs.

Author:
Jeanfrancois Arcand

Method Summary
 void onBroadcast(AtmosphereResourceEvent event)
          Invoked when a Broadcaster.broadcast(T) occurs.
 void onDisconnect(AtmosphereResourceEvent event)
          Invoked when the remote connection gets closed.
 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 considered as suspended.
 void onThrowable(AtmosphereResourceEvent event)
          Invoked when an operations failed to execute for an unknown reason like : IOException because the client remotly closed the connection, a broken connection, etc.
 

Method Detail

onSuspend

void onSuspend(AtmosphereResourceEvent event)
Invoked when the AtmosphereResource.suspend() has been completed and the response considered as suspended.

Parameters:
event - a AtmosphereResourceEvent

onResume

void onResume(AtmosphereResourceEvent event)
Invoked when the AtmosphereResource.resume() is invoked or when the suspend's time out expires.

Parameters:
event - a AtmosphereResourceEvent

onDisconnect

void onDisconnect(AtmosphereResourceEvent event)
Invoked when the remote connection gets closed.

Parameters:
event - a AtmosphereResourceEvent

onBroadcast

void onBroadcast(AtmosphereResourceEvent event)
Invoked when a Broadcaster.broadcast(T) occurs.

Parameters:
event - a AtmosphereResourceEvent

onThrowable

void onThrowable(AtmosphereResourceEvent event)
Invoked when an operations failed to execute for an unknown reason like : IOException because the client remotly closed the connection, a broken connection, etc.

Parameters:
event - a AtmosphereResourceEvent


Copyright © 2012. All Rights Reserved.