org.atmosphere.websocket
Class WebSocketAdapter

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

public abstract class WebSocketAdapter
extends Object
implements WebSocket

Simple class used to expose internal objects to WebSocket


Field Summary
 
Fields inherited from interface org.atmosphere.websocket.WebSocket
WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPEND
 
Constructor Summary
WebSocketAdapter()
           
 
Method Summary
 void close()
          Close the underlying connection.
 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
redirect, write, write, write, writeError
 

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


Copyright © 2012. All Rights Reserved.