Errai 3.0.1-SNAPSHOT

org.jboss.websockets.oio.internal
Class AbstractWebSocket

java.lang.Object
  extended by 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

Field Summary
protected  ClosingStrategy closingStrategy
           
protected  InputStream inputStream
           
protected  OutputStream outputStream
           
protected  String webSocketId
           
 
Constructor Summary
protected AbstractWebSocket(InputStream inputStream, OutputStream outputStream, ClosingStrategy closingStrategy)
           
 
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
 
Methods inherited from interface org.jboss.websockets.oio.OioWebSocket
readFrame, writeFrame
 

Field Detail

webSocketId

protected final String webSocketId

inputStream

protected final InputStream inputStream

outputStream

protected final OutputStream outputStream

closingStrategy

protected final ClosingStrategy closingStrategy
Constructor Detail

AbstractWebSocket

protected AbstractWebSocket(InputStream inputStream,
                            OutputStream outputStream,
                            ClosingStrategy closingStrategy)
Method Detail

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

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.