org.atmosphere.nettosphere
Class ChannelAsyncIOWriter

java.lang.Object
  extended by org.atmosphere.nettosphere.ChannelAsyncIOWriter
All Implemented Interfaces:
org.atmosphere.cpr.AsyncIOWriter

public class ChannelAsyncIOWriter
extends Object
implements org.atmosphere.cpr.AsyncIOWriter

An AsyncIOWriter that bridge Atmosphere output stream with Netty's Channel.


Constructor Summary
ChannelAsyncIOWriter(org.jboss.netty.channel.Channel channel)
           
 
Method Summary
 boolean byteWritten()
           
 void close()
           
 void flush()
           
 boolean isClosed()
           
 long lastTick()
           
 void redirect(String location)
           
 void resumeOnBroadcast(boolean resumeOnBroadcast)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelAsyncIOWriter

public ChannelAsyncIOWriter(org.jboss.netty.channel.Channel channel)
Method Detail

isClosed

public boolean isClosed()

byteWritten

public boolean byteWritten()

resumeOnBroadcast

public void resumeOnBroadcast(boolean resumeOnBroadcast)

redirect

public void redirect(String location)
              throws IOException
Specified by:
redirect in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException

writeError

public void writeError(int errorCode,
                       String message)
                throws IOException
Specified by:
writeError in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException

write

public void write(String data)
           throws IOException
Specified by:
write in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException

write

public void write(byte[] data)
           throws IOException
Specified by:
write in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException

write

public void write(byte[] data,
                  int offset,
                  int length)
           throws IOException
Specified by:
write in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException

lastTick

public long lastTick()

flush

public void flush()
Specified by:
flush in interface org.atmosphere.cpr.AsyncIOWriter

close

public void close()
           throws IOException
Specified by:
close in interface org.atmosphere.cpr.AsyncIOWriter
Throws:
IOException


Copyright © 2012. All Rights Reserved.