public class GzipHttpOutputInterceptor extends Object implements HttpOutput.Interceptor
| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOG |
static HttpField |
VARY_ACCEPT_ENCODING |
static HttpField |
VARY_ACCEPT_ENCODING_USER_AGENT |
| Constructor and Description |
|---|
GzipHttpOutputInterceptor(GzipFactory factory,
HttpChannel channel,
HttpOutput.Interceptor next,
boolean syncFlush) |
GzipHttpOutputInterceptor(GzipFactory factory,
HttpField vary,
HttpChannel channel,
HttpOutput.Interceptor next,
boolean syncFlush) |
GzipHttpOutputInterceptor(GzipFactory factory,
HttpField vary,
int bufferSize,
HttpChannel channel,
HttpOutput.Interceptor next,
boolean syncFlush) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commit(ByteBuffer content,
boolean complete,
Callback callback) |
HttpOutput.Interceptor |
getNextInterceptor() |
boolean |
isOptimizedForDirectBuffers() |
boolean |
mightCompress() |
void |
noCompression() |
void |
noCompressionIfPossible() |
void |
write(ByteBuffer content,
boolean complete,
Callback callback)
Write content.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetBufferpublic static Logger LOG
public static final HttpField VARY_ACCEPT_ENCODING_USER_AGENT
public static final HttpField VARY_ACCEPT_ENCODING
public GzipHttpOutputInterceptor(GzipFactory factory, HttpChannel channel, HttpOutput.Interceptor next, boolean syncFlush)
public GzipHttpOutputInterceptor(GzipFactory factory, HttpField vary, HttpChannel channel, HttpOutput.Interceptor next, boolean syncFlush)
public GzipHttpOutputInterceptor(GzipFactory factory, HttpField vary, int bufferSize, HttpChannel channel, HttpOutput.Interceptor next, boolean syncFlush)
public HttpOutput.Interceptor getNextInterceptor()
getNextInterceptor in interface HttpOutput.Interceptorpublic boolean isOptimizedForDirectBuffers()
isOptimizedForDirectBuffers in interface HttpOutput.InterceptorByteBuffers in the HttpOutput.Interceptor.write(ByteBuffer, boolean, Callback)
method. If false is returned, then passing direct buffers may cause
inefficiencies.public void write(ByteBuffer content, boolean complete, Callback callback)
HttpOutput.Interceptorwrite in interface HttpOutput.Interceptorcontent - The content to be written or an empty buffer.complete - True if this is the last call to writecallback - The callback to use to indicate Callback.succeeded()
or Callback.failed(Throwable).protected void commit(ByteBuffer content, boolean complete, Callback callback)
public void noCompression()
public void noCompressionIfPossible()
public boolean mightCompress()
Copyright © 1995–2017 Webtide. All rights reserved.