private class BufferedResponseHandler.BufferedInterceptor extends java.lang.Object implements HttpOutput.Interceptor
| Modifier and Type | Field and Description |
|---|---|
(package private) java.nio.ByteBuffer |
_aggregate |
(package private) java.lang.Boolean |
_aggregating |
(package private) java.util.Queue<java.nio.ByteBuffer> |
_buffers |
(package private) HttpChannel |
_channel |
(package private) HttpOutput.Interceptor |
_next |
| Constructor and Description |
|---|
BufferedInterceptor(HttpChannel httpChannel,
HttpOutput.Interceptor interceptor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commit(java.util.Queue<java.nio.ByteBuffer> buffers,
Callback callback) |
HttpOutput.Interceptor |
getNextInterceptor() |
boolean |
isOptimizedForDirectBuffers() |
void |
resetBuffer()
Reset the buffers.
|
void |
write(java.nio.ByteBuffer content,
boolean last,
Callback callback)
Write content.
|
final HttpOutput.Interceptor _next
final HttpChannel _channel
final java.util.Queue<java.nio.ByteBuffer> _buffers
java.lang.Boolean _aggregating
java.nio.ByteBuffer _aggregate
public BufferedInterceptor(HttpChannel httpChannel, HttpOutput.Interceptor interceptor)
public void resetBuffer()
HttpOutput.InterceptorIf the Interceptor contains buffers then reset them.
resetBuffer in interface HttpOutput.Interceptorpublic void write(java.nio.ByteBuffer content,
boolean last,
Callback callback)
HttpOutput.Interceptorwrite in interface HttpOutput.Interceptorcontent - The content to be written or an empty buffer.last - True if this is the last call to writecallback - The callback to use to indicate Callback.succeeded()
or Callback.failed(Throwable).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.protected void commit(java.util.Queue<java.nio.ByteBuffer> buffers,
Callback callback)