org.atmosphere.container.version
Class Grizzly2WebSocket

java.lang.Object
  extended by org.atmosphere.cpr.AsyncIOWriterAdapter
      extended by org.atmosphere.websocket.WebSocket
          extended by org.atmosphere.container.version.Grizzly2WebSocket
All Implemented Interfaces:
AsyncIOWriter

public class Grizzly2WebSocket
extends WebSocket


Field Summary
 
Fields inherited from class org.atmosphere.websocket.WebSocket
binaryWrite, lastWrite, WEBSOCKET_ACCEPT_DONE, WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPEND, webSocketResponseFilter
 
Constructor Summary
Grizzly2WebSocket(org.glassfish.grizzly.websockets.WebSocket webSocket, AtmosphereConfig config)
           
 
Method Summary
 void close(AtmosphereResponse r)
          No OPS
 WebSocket flush(AtmosphereResponse r)
          No OPS
 WebSocket redirect(AtmosphereResponse r, String location)
          No OPS
 WebSocket write(AtmosphereResponse r, byte[] data)
          No OPS
 WebSocket write(AtmosphereResponse r, byte[] data, int offset, int length)
          No OPS
 WebSocket write(AtmosphereResponse r, String data)
          No OPS
 WebSocket writeError(AtmosphereResponse r, int errorCode, String message)
          No OPS
 
Methods inherited from class org.atmosphere.websocket.WebSocket
lastWriteTimeStampInMilliseconds, resource, resource, webSocketResponseFilter
 
Methods inherited from class org.atmosphere.cpr.AsyncIOWriterAdapter
close, flush, redirect, write, write, write, writeError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grizzly2WebSocket

public Grizzly2WebSocket(org.glassfish.grizzly.websockets.WebSocket webSocket,
                         AtmosphereConfig config)
Method Detail

writeError

public WebSocket writeError(AtmosphereResponse r,
                            int errorCode,
                            String message)
                     throws IOException
No OPS

Specified by:
writeError in interface AsyncIOWriter
Overrides:
writeError in class AsyncIOWriterAdapter
errorCode - the error code
Throws:
IOException

redirect

public WebSocket redirect(AtmosphereResponse r,
                          String location)
                   throws IOException
No OPS

Specified by:
redirect in interface AsyncIOWriter
Overrides:
redirect in class AsyncIOWriterAdapter
Throws:
IOException

write

public WebSocket write(AtmosphereResponse r,
                       String data)
                throws IOException
No OPS

Specified by:
write in interface AsyncIOWriter
Overrides:
write in class AsyncIOWriterAdapter
data - the WebSocket message
Throws:
IOException

write

public WebSocket write(AtmosphereResponse r,
                       byte[] data)
                throws IOException
No OPS

Specified by:
write in interface AsyncIOWriter
Overrides:
write in class AsyncIOWriterAdapter
data - the WebSocket message
Throws:
IOException

write

public WebSocket write(AtmosphereResponse r,
                       byte[] data,
                       int offset,
                       int length)
                throws IOException
No OPS

Specified by:
write in interface AsyncIOWriter
Overrides:
write in class AsyncIOWriterAdapter
data - the WebSocket message
offset - offset of the message
length - length if the message
Throws:
IOException

close

public void close(AtmosphereResponse r)
           throws IOException
No OPS

Specified by:
close in interface AsyncIOWriter
Overrides:
close in class AsyncIOWriterAdapter
Throws:
IOException

flush

public WebSocket flush(AtmosphereResponse r)
                throws IOException
No OPS

Specified by:
flush in interface AsyncIOWriter
Overrides:
flush in class AsyncIOWriterAdapter
Throws:
IOException


Copyright © 2012. All Rights Reserved.