| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Connection | |
| private final AtomicBoolean | |
| protected final boolean | |
| protected static final Logger | |
| protected final Output | |
| private long | |
| protected static final Integer | |
| protected static final GrizzlyFuture |
| Access | Constructor and Description |
|---|---|
| protected | AbstractStreamWriter(final Connection<L> connection, Output streamOutput)
Create a new ByteBufferWriter. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public GrizzlyFuture | close(CompletionHandler<Integer> completionHandler)
Implements org. Close the |
| public <E> GrizzlyFuture | encode(Transformer<E, Buffer> encoder, E object)
Implements org.
|
| public <E> GrizzlyFuture | encode(Transformer<E, Buffer> encoder, E object, CompletionHandler<Stream> completionHandler)
Implements org.
|
| public GrizzlyFuture | flush()
Implements org. Cause the overflow handler to be called even if buffer is not full. |
| public GrizzlyFuture | flush(CompletionHandler<Integer> completionHandler)
Implements org. Cause the overflow handler to be called even if buffer is not full. |
| public Connection | getConnection()
Implements org. Get the |
| public long | getTimeout(TimeUnit timeunit)
Implements org. Get the timeout for StreamWriter I/O operations. |
| public boolean | isClosed()
Implements org. Returns true, if StreamReader has been closed, or false otherwise. |
| public void | setTimeout(long timeout, TimeUnit timeunit)
Implements org. Set the timeout for StreamWriter I/O operations. |
| public void | writeBoolean(final boolean data)
Implements org. Write the boolean value to the StreamWriter. |
| public void | writeBooleanArray(final boolean[] data)
Implements org. Write the array of boolean values to the StreamWriter. |
| public void | writeBuffer(Buffer b)
Implements org. Write the |
| public void | writeByte(final byte data)
Implements org. Write the byte value to the StreamWriter. |
| public void | writeByteArray(final byte[] data)
Implements org. Write the array of byte values to the StreamWriter. |
| public void | writeByteArray(byte[] data, int offset, int length)
Implements org. Write the part of array of byte values to the StreamWriter, using specific offset and length values. |
| public void | writeChar(final char data)
Implements org. Write the char value to the StreamWriter. |
| public void | writeCharArray(final char[] data)
Implements org. Write the array of char values to the StreamWriter. |
| public void | writeDouble(final double data)
Implements org. Write the double value to the StreamWriter. |
| public void | writeDoubleArray(final double[] data)
Implements org. Write the array of double values to the StreamWriter. |
| public void | writeFloat(final float data)
Implements org. Write the float value to the StreamWriter. |
| public void | writeFloatArray(final float[] data)
Implements org. Write the array of float values to the StreamWriter. |
| public void | writeInt(final int data)
Implements org. Write the int value to the StreamWriter. |
| public void | writeIntArray(final int[] data)
Implements org. Write the array of int values to the StreamWriter. |
| public void | writeLong(final long data)
Implements org. Write the long value to the StreamWriter. |
| public void | writeLongArray(final long[] data)
Implements org. Write the array of long values to the StreamWriter. |
| public void | writeShort(final short data)
Implements org. Write the short value to the StreamWriter. |
| public void | writeShortArray(final short[] data)
Implements org. Write the array of short values to the StreamWriter. |
| connection | back to summary |
|---|---|
| private final Connection<L> connection | |
| isClosed | back to summary |
|---|---|
| private final AtomicBoolean isClosed | |
| isOutputBuffered | back to summary |
|---|---|
| protected final boolean isOutputBuffered | |
| logger | back to summary |
|---|---|
| protected static final Logger logger | |
| output | back to summary |
|---|---|
| protected final Output output | |
| timeoutMillis | back to summary |
|---|---|
| private long timeoutMillis | |
| ZERO | back to summary |
|---|---|
| protected static final Integer ZERO | |
| ZERO_READY_FUTURE | back to summary |
|---|---|
| protected static final GrizzlyFuture<Integer> ZERO_READY_FUTURE | |
| AbstractStreamWriter | back to summary |
|---|---|
| protected AbstractStreamWriter(final Connection<L> connection, Output streamOutput) Create a new ByteBufferWriter. An instance maintains a current buffer for use in writing. Whenever the current buffer is insufficient to hold the required data, the BufferHandler is called, and the result of the handler is the new current buffer. The handler is responsible for the disposition of the contents of the old buffer. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| close | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Close the
| |
| encode | back to summary |
|---|---|
| public <E> GrizzlyFuture Implements org.
| |
| encode | back to summary |
|---|---|
| public <E> GrizzlyFuture Implements org.
| |
| flush | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Cause the overflow handler to be called even if buffer is not full.
| |
| flush | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Cause the overflow handler to be called even if buffer is not full.
| |
| getConnection | back to summary |
|---|---|
| public Connection Implements org. Doc from org. Get the
| |
| getTimeout | back to summary |
|---|---|
| public long getTimeout(TimeUnit timeunit) Implements org. Doc from org. Get the timeout for StreamWriter I/O operations.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Doc from org. Returns true, if StreamReader has been closed, or false otherwise.
| |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(long timeout, TimeUnit timeunit) Implements org. Doc from org. Set the timeout for StreamWriter I/O operations.
| |
| writeBoolean | back to summary |
|---|---|
| public void writeBoolean(final boolean data) throws IOException Implements org. Doc from org. Write the boolean value to the StreamWriter.
| |
| writeBooleanArray | back to summary |
|---|---|
| public void writeBooleanArray(final boolean[] data) throws IOException Implements org. Doc from org. Write the array of boolean values to the StreamWriter.
| |
| writeBuffer | back to summary |
|---|---|
| public void writeBuffer(Buffer b) throws IOException Implements org. Doc from org. Write the
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(final byte data) throws IOException Implements org. Doc from org. Write the byte value to the StreamWriter.
| |
| writeByteArray | back to summary |
|---|---|
| public void writeByteArray(final byte[] data) throws IOException Implements org. Doc from org. Write the array of byte values to the StreamWriter.
| |
| writeByteArray | back to summary |
|---|---|
| public void writeByteArray(byte[] data, int offset, int length) throws IOException Implements org. Doc from org. Write the part of array of byte values to the StreamWriter, using specific offset and length values.
| |
| writeChar | back to summary |
|---|---|
| public void writeChar(final char data) throws IOException Implements org. Doc from org. Write the char value to the StreamWriter.
| |
| writeCharArray | back to summary |
|---|---|
| public void writeCharArray(final char[] data) throws IOException Implements org. Doc from org. Write the array of char values to the StreamWriter.
| |
| writeDouble | back to summary |
|---|---|
| public void writeDouble(final double data) throws IOException Implements org. Doc from org. Write the double value to the StreamWriter.
| |
| writeDoubleArray | back to summary |
|---|---|
| public void writeDoubleArray(final double[] data) throws IOException Implements org. Doc from org. Write the array of double values to the StreamWriter.
| |
| writeFloat | back to summary |
|---|---|
| public void writeFloat(final float data) throws IOException Implements org. Doc from org. Write the float value to the StreamWriter.
| |
| writeFloatArray | back to summary |
|---|---|
| public void writeFloatArray(final float[] data) throws IOException Implements org. Doc from org. Write the array of float values to the StreamWriter.
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(final int data) throws IOException Implements org. Doc from org. Write the int value to the StreamWriter.
| |
| writeIntArray | back to summary |
|---|---|
| public void writeIntArray(final int[] data) throws IOException Implements org. Doc from org. Write the array of int values to the StreamWriter.
| |
| writeLong | back to summary |
|---|---|
| public void writeLong(final long data) throws IOException Implements org. Doc from org. Write the long value to the StreamWriter.
| |
| writeLongArray | back to summary |
|---|---|
| public void writeLongArray(final long[] data) throws IOException Implements org. Doc from org. Write the array of long values to the StreamWriter.
| |
| writeShort | back to summary |
|---|---|
| public void writeShort(final short data) throws IOException Implements org. Doc from org. Write the short value to the StreamWriter.
| |
| writeShortArray | back to summary |
|---|---|
| public void writeShortArray(final short[] data) throws IOException Implements org. Doc from org. Write the array of short values to the StreamWriter.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancelled()
Implements org. The operation was cancelled. |
| public void | completed(Object result)
Implements org. The operation was completed. |
| protected void | |
| public void | failed(Throwable throwable)
Implements org. The operation was failed. |
| public void | updated(Object result)
Implements org. The callback method may be called, when there is some progress in operation execution, but it is still not completed |
| buffer | back to summary |
|---|---|
| private final Buffer buffer | |
| DisposeBufferCompletionHandler | back to summary |
|---|---|
| public DisposeBufferCompletionHandler(Buffer buffer) | |
| cancelled | back to summary |
|---|---|
| public void cancelled() Implements org. Doc from org. The operation was cancelled.
| |
| completed | back to summary |
|---|---|
| public void completed(Object result) Implements org. Doc from org. The operation was completed.
| |
| disposeBuffer | back to summary |
|---|---|
| protected void disposeBuffer() | |
| failed | back to summary |
|---|---|
| public void failed(Throwable throwable) Implements org. Doc from org. The operation was failed.
| |
| updated | back to summary |
|---|---|
| public void updated(Object result) Implements org. Doc from org. The callback method may be called, when there is some progress in operation execution, but it is still not completed
| |