Package org.glassfish.grizzly.streams
Class TransformerOutput
- java.lang.Object
-
- org.glassfish.grizzly.streams.BufferedOutput
-
- org.glassfish.grizzly.streams.TransformerOutput
-
- All Implemented Interfaces:
Output
public class TransformerOutput extends BufferedOutput
- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeStorageattributeStorageprotected MemoryManagermemoryManagerprotected Transformer<Buffer,Buffer>transformerprotected OutputunderlyingOutput-
Fields inherited from class org.glassfish.grizzly.streams.BufferedOutput
bufferSize, isClosed, multiBufferWindow, ZERO, ZERO_READY_FUTURE
-
-
Constructor Summary
Constructors Constructor Description TransformerOutput(Transformer<Buffer,Buffer> transformer, Output underlyingOutput, Connection connection)TransformerOutput(Transformer<Buffer,Buffer> transformer, Output underlyingOutput, MemoryManager memoryManager, AttributeStorage attributeStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GrizzlyFuture<Integer>flush0(Buffer buffer, CompletionHandler<Integer> completionHandler)protected BuffernewBuffer(int size)protected voidonClosed()protected BufferreallocateBuffer(Buffer oldBuffer, int size)-
Methods inherited from class org.glassfish.grizzly.streams.BufferedOutput
close, ensureBufferCapacity, flush, getBuffer, getBufferedSize, isBuffered, write, write
-
-
-
-
Field Detail
-
transformer
protected final Transformer<Buffer,Buffer> transformer
-
underlyingOutput
protected final Output underlyingOutput
-
memoryManager
protected final MemoryManager memoryManager
-
attributeStorage
protected final AttributeStorage attributeStorage
-
-
Constructor Detail
-
TransformerOutput
public TransformerOutput(Transformer<Buffer,Buffer> transformer, Output underlyingOutput, Connection connection)
-
TransformerOutput
public TransformerOutput(Transformer<Buffer,Buffer> transformer, Output underlyingOutput, MemoryManager memoryManager, AttributeStorage attributeStorage)
-
-
Method Detail
-
flush0
protected GrizzlyFuture<Integer> flush0(Buffer buffer, CompletionHandler<Integer> completionHandler) throws IOException
- Specified by:
flush0in classBufferedOutput- Throws:
IOException
-
newBuffer
protected Buffer newBuffer(int size)
- Specified by:
newBufferin classBufferedOutput
-
reallocateBuffer
protected Buffer reallocateBuffer(Buffer oldBuffer, int size)
- Specified by:
reallocateBufferin classBufferedOutput
-
onClosed
protected void onClosed() throws IOException- Specified by:
onClosedin classBufferedOutput- Throws:
IOException
-
-