Class WebSocketTransport.SocketIOWebSocketSessionWrapperImpl
- java.lang.Object
-
- org.atmosphere.socketio.transport.WebSocketTransport.SocketIOWebSocketSessionWrapperImpl
-
- All Implemented Interfaces:
SocketIOOutbound,SocketIOSessionOutbound,SocketIOWebSocketSessionWrapper
- Enclosing class:
- WebSocketTransport
public class WebSocketTransport.SocketIOWebSocketSessionWrapperImpl extends java.lang.Object implements SocketIOWebSocketSessionWrapper
-
-
Field Summary
Fields Modifier and Type Field Description booleaninitiatedSocketIOSessionsessionSocketIOWebSocketEventListenersocketioEventListenerorg.atmosphere.websocket.WebSocketwebSocket
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Cause connection and all activity to be aborted and all resources to be released.voidclose()force close connectionvoiddisconnect()disconnect the current connectionSocketIOSessiongetSession()java.lang.StringgetSessionId()org.atmosphere.cpr.Actionhandle(org.atmosphere.cpr.AtmosphereRequest request, org.atmosphere.cpr.AtmosphereResponse response, SocketIOSession session)voidinitiated(boolean initiated)booleanisInitiated()voidonDisconnect()voidonMessage(byte frame, byte[] data, int offset, int length)voidonMessage(byte frame, java.lang.String message)voidsendMessage(java.lang.String message)Send a message to the client.voidsendMessage(java.util.List<SocketIOPacketImpl> messages)Send messages to the client.voidsendMessage(SocketIOPacket packet)Send a message to the client formatted is SocketIO format.voidsetWebSocket(org.atmosphere.websocket.WebSocket websocket)org.atmosphere.websocket.WebSocketwebSocket()
-
-
-
Field Detail
-
session
public final SocketIOSession session
-
socketioEventListener
public final SocketIOWebSocketEventListener socketioEventListener
-
initiated
public boolean initiated
-
webSocket
public org.atmosphere.websocket.WebSocket webSocket
-
-
Method Detail
-
onDisconnect
public void onDisconnect()
- Specified by:
onDisconnectin interfaceSocketIOWebSocketSessionWrapper
-
onMessage
public void onMessage(byte frame, java.lang.String message)- Specified by:
onMessagein interfaceSocketIOWebSocketSessionWrapper
-
onMessage
public void onMessage(byte frame, byte[] data, int offset, int length)- Specified by:
onMessagein interfaceSocketIOWebSocketSessionWrapper
-
disconnect
public void disconnect()
Description copied from interface:SocketIOOutbounddisconnect the current connection- Specified by:
disconnectin interfaceSocketIOOutbound
-
close
public void close()
Description copied from interface:SocketIOOutboundforce close connection- Specified by:
closein interfaceSocketIOOutbound
-
sendMessage
public void sendMessage(SocketIOPacket packet) throws SocketIOException
Description copied from interface:SocketIOOutboundSend a message to the client formatted is SocketIO format. If the session is still active, the message will be cached if the connection is closed.- Specified by:
sendMessagein interfaceSocketIOOutbound- Parameters:
packet- The message to send- Throws:
SocketIOException
-
sendMessage
public void sendMessage(java.util.List<SocketIOPacketImpl> messages) throws SocketIOException
Description copied from interface:SocketIOOutboundSend messages to the client. If the session is still active, the messages will be cached if the connection is closed.- Specified by:
sendMessagein interfaceSocketIOOutbound- Throws:
SocketIOException
-
sendMessage
public void sendMessage(java.lang.String message) throws SocketIOExceptionDescription copied from interface:SocketIOOutboundSend a message to the client. If the session is still active, the message will be cached if the connection is closed.- Specified by:
sendMessagein interfaceSocketIOOutbound- Parameters:
message- The message to send- Throws:
SocketIOException
-
handle
public org.atmosphere.cpr.Action handle(org.atmosphere.cpr.AtmosphereRequest request, org.atmosphere.cpr.AtmosphereResponse response, SocketIOSession session) throws java.io.IOException- Specified by:
handlein interfaceSocketIOSessionOutbound- Returns:
- Throws:
java.io.IOException
-
abort
public void abort()
Description copied from interface:SocketIOSessionOutboundCause connection and all activity to be aborted and all resources to be released. The handler is expected to call the session's onShutdown() when it is finished. The only session method that the handler can legally call after this is onShutdown();- Specified by:
abortin interfaceSocketIOSessionOutbound
-
getSession
public SocketIOSession getSession()
- Specified by:
getSessionin interfaceSocketIOWebSocketSessionWrapper- Returns:
-
isInitiated
public boolean isInitiated()
- Specified by:
isInitiatedin interfaceSocketIOWebSocketSessionWrapper- Returns:
-
webSocket
public org.atmosphere.websocket.WebSocket webSocket()
- Specified by:
webSocketin interfaceSocketIOWebSocketSessionWrapper- Returns:
-
setWebSocket
public void setWebSocket(org.atmosphere.websocket.WebSocket websocket)
- Specified by:
setWebSocketin interfaceSocketIOWebSocketSessionWrapper
-
initiated
public void initiated(boolean initiated)
- Specified by:
initiatedin interfaceSocketIOWebSocketSessionWrapper
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionIdin interfaceSocketIOSessionOutbound- Returns:
-
-