org.atmosphere.nettosphere
Class NettyWebSocket

java.lang.Object
  extended by org.atmosphere.websocket.WebSocketAdapter
      extended by org.atmosphere.nettosphere.NettyWebSocket
All Implemented Interfaces:
org.atmosphere.cpr.AsyncIOWriter, org.atmosphere.websocket.WebSocket

public class NettyWebSocket
extends org.atmosphere.websocket.WebSocketAdapter


Field Summary
 
Fields inherited from class org.atmosphere.websocket.WebSocketAdapter
lastWrite
 
Fields inherited from interface org.atmosphere.websocket.WebSocket
WEBSOCKET_ACCEPT_DONE, WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPEND
 
Constructor Summary
NettyWebSocket(org.jboss.netty.channel.Channel channel, org.atmosphere.cpr.AtmosphereConfig config)
           
 
Method Summary
 void close()
          
 void flush()
          
 void redirect(String location)
          
 void write(byte[] data)
          
 void write(byte[] data, int offset, int length)
          
 void write(String data)
          
 void writeError(int errorCode, String message)
          
 
Methods inherited from class org.atmosphere.websocket.WebSocketAdapter
lastTick, resource, setAtmosphereResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NettyWebSocket

public NettyWebSocket(org.jboss.netty.channel.Channel channel,
                      org.atmosphere.cpr.AtmosphereConfig config)
Method Detail

redirect

public void redirect(String location)
              throws IOException

Throws:
IOException

writeError

public void writeError(int errorCode,
                       String message)
                throws IOException

Throws:
IOException

write

public void write(String data)
           throws IOException

Throws:
IOException

write

public void write(byte[] data)
           throws IOException

Throws:
IOException

write

public void write(byte[] data,
                  int offset,
                  int length)
           throws IOException

Throws:
IOException

close

public void close()
           throws IOException

Specified by:
close in interface org.atmosphere.cpr.AsyncIOWriter
Overrides:
close in class org.atmosphere.websocket.WebSocketAdapter
Throws:
IOException

flush

public void flush()
           throws IOException

Throws:
IOException


Copyright © 2012. All Rights Reserved.