org.atmosphere.websocket
Class WebSocketAdapter

java.lang.Object
  extended by org.atmosphere.websocket.WebSocketAdapter
All Implemented Interfaces:
AsyncIOWriter, WebSocket
Direct Known Subclasses:
GrizzlyWebSocket, Jetty8WebSocket, TomcatWebSocket

public abstract class WebSocketAdapter
extends Object
implements WebSocket

Simple class used to expose internal objects to WebSocket

Author:
Jeanfrancois Arcand

Field Summary
protected  long lastWrite
           
 
Fields inherited from interface org.atmosphere.websocket.WebSocket
WEBSOCKET_ACCEPT_DONE, WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPEND
 
Constructor Summary
WebSocketAdapter()
           
 
Method Summary
 void close()
          Close the underlying connection.
 long lastTick()
           
 AtmosphereResource resource()
          Return the current AtmosphereResource representing the underlying connection and the original HttpServletRequest
 WebSocketAdapter setAtmosphereResource(AtmosphereResource r)
          Configure the AtmosphereResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.atmosphere.cpr.AsyncIOWriter
flush, redirect, write, write, write, writeError
 

Field Detail

lastWrite

protected long lastWrite
Constructor Detail

WebSocketAdapter

public WebSocketAdapter()
Method Detail

setAtmosphereResource

public WebSocketAdapter setAtmosphereResource(AtmosphereResource r)
Configure the AtmosphereResource

Parameters:
r - the AtmosphereResource

close

public void close()
           throws IOException
Description copied from interface: AsyncIOWriter
Close the underlying connection.

Specified by:
close in interface AsyncIOWriter
Throws:
IOException

resource

public AtmosphereResource resource()
Description copied from interface: WebSocket
Return the current AtmosphereResource representing the underlying connection and the original HttpServletRequest

Specified by:
resource in interface WebSocket
Returns:
the current AtmosphereResource

lastTick

public long lastTick()


Copyright © 2012. All Rights Reserved.