public abstract class ChannelWriter
extends org.atmosphere.cpr.AtmosphereInterceptorWriter
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.channel.Channel |
channel |
protected static byte[] |
CHUNK_DELIMITER |
protected static java.lang.String |
CRLF |
protected java.util.concurrent.atomic.AtomicBoolean |
doneProcessing |
protected static java.lang.String |
END |
protected static byte[] |
ENDCHUNK |
protected boolean |
keepAlive |
protected long |
lastWrite |
protected static org.slf4j.Logger |
logger |
protected org.atmosphere.util.ByteArrayAsyncWriter |
transformCacheBuffer |
protected boolean |
writeHeader |
| Constructor and Description |
|---|
ChannelWriter(io.netty.channel.Channel channel,
boolean writeHeader,
boolean keepAlive) |
| Modifier and Type | Method and Description |
|---|---|
abstract org.atmosphere.cpr.AsyncIOWriter |
asyncWrite(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data,
int offset,
int length) |
protected java.lang.String |
constructStatusAndHeaders(org.atmosphere.cpr.AtmosphereResponse response,
int contentLength) |
boolean |
isClosed() |
long |
lastTick() |
protected byte[] |
transform(org.atmosphere.cpr.AtmosphereResponse response,
byte[] b,
int offset,
int length) |
org.atmosphere.cpr.AsyncIOWriter |
write(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data) |
org.atmosphere.cpr.AsyncIOWriter |
write(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data,
int offset,
int length) |
org.atmosphere.cpr.AsyncIOWriter |
write(org.atmosphere.cpr.AtmosphereResponse response,
java.lang.String data) |
org.atmosphere.cpr.AsyncIOWriter |
writeError(org.atmosphere.cpr.AtmosphereResponse response,
int errorCode,
java.lang.String message) |
protected static final org.slf4j.Logger logger
protected static final java.lang.String END
protected static final java.lang.String CRLF
protected static final byte[] CHUNK_DELIMITER
protected static final byte[] ENDCHUNK
protected final io.netty.channel.Channel channel
protected final java.util.concurrent.atomic.AtomicBoolean doneProcessing
protected final org.atmosphere.util.ByteArrayAsyncWriter transformCacheBuffer
protected final boolean writeHeader
protected long lastWrite
protected boolean keepAlive
public ChannelWriter(io.netty.channel.Channel channel,
boolean writeHeader,
boolean keepAlive)
public boolean isClosed()
public org.atmosphere.cpr.AsyncIOWriter writeError(org.atmosphere.cpr.AtmosphereResponse response,
int errorCode,
java.lang.String message)
throws java.io.IOException
writeError in interface org.atmosphere.cpr.AsyncIOWriterwriteError in class org.atmosphere.cpr.AtmosphereInterceptorWriterjava.io.IOExceptionpublic org.atmosphere.cpr.AsyncIOWriter write(org.atmosphere.cpr.AtmosphereResponse response,
java.lang.String data)
throws java.io.IOException
write in interface org.atmosphere.cpr.AsyncIOWriterwrite in class org.atmosphere.cpr.AtmosphereInterceptorWriterjava.io.IOExceptionpublic org.atmosphere.cpr.AsyncIOWriter write(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data)
throws java.io.IOException
write in interface org.atmosphere.cpr.AsyncIOWriterwrite in class org.atmosphere.cpr.AtmosphereInterceptorWriterjava.io.IOExceptionprotected byte[] transform(org.atmosphere.cpr.AtmosphereResponse response,
byte[] b,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic org.atmosphere.cpr.AsyncIOWriter write(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data,
int offset,
int length)
throws java.io.IOException
write in interface org.atmosphere.cpr.AsyncIOWriterwrite in class org.atmosphere.cpr.AtmosphereInterceptorWriterjava.io.IOExceptionpublic long lastTick()
protected java.lang.String constructStatusAndHeaders(org.atmosphere.cpr.AtmosphereResponse response,
int contentLength)
public abstract org.atmosphere.cpr.AsyncIOWriter asyncWrite(org.atmosphere.cpr.AtmosphereResponse response,
byte[] data,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionCopyright © 2018. All Rights Reserved.