org.jboss.websockets.oio.internal
Class AbstractWebSocket
java.lang.Object
org.jboss.websockets.oio.internal.AbstractWebSocket
- All Implemented Interfaces:
- OioWebSocket
- Direct Known Subclasses:
- Hybi00Socket, Hybi07Socket, Hybi13Socket
public abstract class AbstractWebSocket
- extends Object
- implements OioWebSocket
- Author:
- Mike Brock
Method Summary |
void |
closeSocket()
Terminates the connection with the client and closes the socket. |
String |
getSocketID()
A unique ID associated with the socket, which can be used for session association. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
webSocketId
protected final String webSocketId
inputStream
protected final InputStream inputStream
outputStream
protected final OutputStream outputStream
closingStrategy
protected final ClosingStrategy closingStrategy
AbstractWebSocket
protected AbstractWebSocket(InputStream inputStream,
OutputStream outputStream,
ClosingStrategy closingStrategy)
getSocketID
public final String getSocketID()
- Description copied from interface:
OioWebSocket
- A unique ID associated with the socket, which can be used for session association. This ID is generated by the
WebSockets framework as a random hash when the socket is open and has no association with any external API or
the websocket handshake process.
- Specified by:
getSocketID
in interface OioWebSocket
- Returns:
- A hex string representing the unique ID of the socket.
closeSocket
public void closeSocket()
throws IOException
- Description copied from interface:
OioWebSocket
- Terminates the connection with the client and closes the socket.
- Specified by:
closeSocket
in interface OioWebSocket
- Throws:
IOException
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.