Package org.atmosphere.socketio.cpr
Class SocketIOAtmosphereHandler
- java.lang.Object
-
- org.atmosphere.socketio.cpr.SocketIOAtmosphereHandler
-
- All Implemented Interfaces:
org.atmosphere.cpr.AtmosphereHandler
public abstract class SocketIOAtmosphereHandler extends java.lang.Object implements org.atmosphere.cpr.AtmosphereHandler- Author:
- Sebastien Dionne : sebastien.dionne@gmail.com, Jeanfrancois Arcand
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSOCKETIO_SESSION_IDstatic java.lang.StringSOCKETIO_SESSION_OUTBOUND
-
Constructor Summary
Constructors Constructor Description SocketIOAtmosphereHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy()abstract voidonConnect(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler)Called when the connection is established.abstract voidonDisconnect(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler, DisconnectReason reason)Called when the socket connection is disconnected.abstract voidonMessage(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler, java.lang.String message)Called for each message received.voidonRequest(org.atmosphere.cpr.AtmosphereResource event)voidonStateChange(org.atmosphere.cpr.AtmosphereResourceEvent event)
-
-
-
Field Detail
-
SOCKETIO_SESSION_OUTBOUND
public static final java.lang.String SOCKETIO_SESSION_OUTBOUND
- See Also:
- Constant Field Values
-
SOCKETIO_SESSION_ID
public static final java.lang.String SOCKETIO_SESSION_ID
-
-
Method Detail
-
onConnect
public abstract void onConnect(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler) throws java.io.IOExceptionCalled when the connection is established.- Parameters:
handler- The SocketOutbound associated with the connection- Throws:
java.io.IOException
-
onDisconnect
public abstract void onDisconnect(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler, DisconnectReason reason)Called when the socket connection is disconnected.- Parameters:
event- AtmosphereResourcehandler- outbound handler to broadcast responsereason- The reason for the disconnect.
-
onMessage
public abstract void onMessage(org.atmosphere.cpr.AtmosphereResource event, SocketIOSessionOutbound handler, java.lang.String message)Called for each message received.- Parameters:
event- AtmosphereResourcehandler- outbound handler to broadcast responsemessage- message received
-
onRequest
public final void onRequest(org.atmosphere.cpr.AtmosphereResource event) throws java.io.IOException- Specified by:
onRequestin interfaceorg.atmosphere.cpr.AtmosphereHandler- Throws:
java.io.IOException
-
onStateChange
public final void onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent event) throws java.io.IOException- Specified by:
onStateChangein interfaceorg.atmosphere.cpr.AtmosphereHandler- Throws:
java.io.IOException
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.atmosphere.cpr.AtmosphereHandler
-
-