Top Inners Fields Constructors Methods
org.glassfish.grizzly.nio.transport

public final Class DefaultStreamWriter

extends AbstractStreamWriter
Class Inheritance
Annotations
@SuppressWarnings:unchecked
Imports
java.io.IOException, java.net.SocketAddress, org.glassfish.grizzly.Buffer, .CompletionHandler, .Connection, .GrizzlyFuture, .WriteResult, org.glassfish.grizzly.impl.FutureImpl, .SafeFutureImpl, org.glassfish.grizzly.memory.Buffers, org.glassfish.grizzly.streams.AbstractStreamWriter, .BufferedOutput

Author
Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
private static class

Field Summary

Inherited from org.glassfish.grizzly.streams.AbstractStreamWriter:
isOutputBufferedloggeroutputZEROZERO_READY_FUTURE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public GrizzlyFuture<Integer>
flush(final CompletionHandler<Integer> completionHandler)

Overrides org.glassfish.grizzly.streams.AbstractStreamWriter.flush.

Implements org.glassfish.grizzly.streams.StreamWriter.flush.

Cause the overflow handler to be called even if buffer is not full.

Inherited from org.glassfish.grizzly.streams.AbstractStreamWriter:
closecloseencodeencodeflushgetConnectiongetTimeoutisClosedsetTimeoutwriteBooleanwriteBooleanArraywriteBufferwriteBytewriteByteArraywriteByteArraywriteCharwriteCharArraywriteDoublewriteDoubleArraywriteFloatwriteFloatArraywriteIntwriteIntArraywriteLongwriteLongArraywriteShortwriteShortArray

Constructor Detail

DefaultStreamWriterback to summary
public DefaultStreamWriter(Connection<L> connection)

Method Detail

flushback to summary
public GrizzlyFuture<Integer> flush(final CompletionHandler<Integer> completionHandler) throws IOException

Overrides org.glassfish.grizzly.streams.AbstractStreamWriter.flush.

Implements org.glassfish.grizzly.streams.StreamWriter.flush.

Doc from org.glassfish.grizzly.streams.AbstractStreamWriter.flush.

Cause the overflow handler to be called even if buffer is not full.

Annotations
@Override
org.glassfish.grizzly.nio.transport back to summary

private final Class DefaultStreamWriter.CompletionHandlerAdapter

extends Object
implements CompletionHandler<WriteResult<Buffer, SocketAddress>>
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.nio.transport.DefaultStreamWriter.CompletionHandlerAdapter
All Implemented Interfaces
org.glassfish.grizzly.CompletionHandler

Field Summary

Modifier and TypeField and Description
private final CompletionHandler<Integer>
private final FutureImpl<Integer>
private final DefaultStreamWriter.Output

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

public void
completed(WriteResult<K, L> result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

public void
failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

public void
updated(WriteResult<K, L> result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

completionHandlerback to summary
private final CompletionHandler<Integer> completionHandler
futureback to summary
private final FutureImpl<Integer> future
outputback to summary
private final DefaultStreamWriter.Output output

Constructor Detail

CompletionHandlerAdapterback to summary
public CompletionHandlerAdapter(DefaultStreamWriter.Output output, FutureImpl<Integer> future, CompletionHandler<Integer> completionHandler)

Method Detail

cancelledback to summary
public void cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

Doc from org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

Annotations
@Override
completedback to summary
public void completed(WriteResult<K, L> result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

Doc from org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

Annotations
@Override
failedback to summary
public void failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

Doc from org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

Annotations
@Override
updatedback to summary
public void updated(WriteResult<K, L> result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

Doc from org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Annotations
@Override
org.glassfish.grizzly.nio.transport back to summary

public final Class DefaultStreamWriter.Output

extends BufferedOutput
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Connection<L>
private int
Inherited from org.glassfish.grizzly.streams.BufferedOutput:
bufferSizeisClosedmultiBufferWindowZEROZERO_READY_FUTURE

Constructor Summary

AccessConstructor and Description
public
Output(Connection<L> connection)

Method Summary

Modifier and TypeMethod and Description
protected GrizzlyFuture<Integer>
flush0(Buffer buffer, final CompletionHandler<Integer> completionHandler)

Implements abstract org.glassfish.grizzly.streams.BufferedOutput.flush0.

protected Buffer
protected void
protected Buffer
Inherited from org.glassfish.grizzly.streams.BufferedOutput:
closeensureBufferCapacityflushgetBuffergetBufferedSizeisBufferedwritewrite

Field Detail

connectionback to summary
private final Connection<L> connection
sentBytesCounterback to summary
private int sentBytesCounter

Constructor Detail

Outputback to summary
public Output(Connection<L> connection)

Method Detail

flush0back to summary
protected GrizzlyFuture<Integer> flush0(Buffer buffer, final CompletionHandler<Integer> completionHandler) throws IOException

Implements abstract org.glassfish.grizzly.streams.BufferedOutput.flush0.

Annotations
@Override
newBufferback to summary
protected Buffer newBuffer(int size)

Implements abstract org.glassfish.grizzly.streams.BufferedOutput.newBuffer.

Annotations
@Override
onClosedback to summary
protected void onClosed() throws IOException

Implements abstract org.glassfish.grizzly.streams.BufferedOutput.onClosed.

Annotations
@Override
reallocateBufferback to summary
protected Buffer reallocateBuffer(Buffer oldBuffer, int size)

Implements abstract org.glassfish.grizzly.streams.BufferedOutput.reallocateBuffer.

Annotations
@Override
org.glassfish.grizzly.nio.transport back to summary

private final Class DefaultStreamWriter.ResetCounterCompletionHandler

extends Object
implements CompletionHandler<Integer>
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.nio.transport.DefaultStreamWriter.ResetCounterCompletionHandler
All Implemented Interfaces
org.glassfish.grizzly.CompletionHandler

Field Summary

Modifier and TypeField and Description
private final DefaultStreamWriter.Output
private final CompletionHandler<Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

public void
completed(Integer result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

public void
failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

public void
updated(Integer result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

outputback to summary
private final DefaultStreamWriter.Output output
parentCompletionHandlerback to summary
private final CompletionHandler<Integer> parentCompletionHandler

Constructor Detail

ResetCounterCompletionHandlerback to summary
public ResetCounterCompletionHandler(DefaultStreamWriter.Output output, CompletionHandler<Integer> parentCompletionHandler)

Method Detail

cancelledback to summary
public void cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

Doc from org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

Annotations
@Override
completedback to summary
public void completed(Integer result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

Doc from org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

Annotations
@Override
failedback to summary
public void failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

Doc from org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

Annotations
@Override
updatedback to summary
public void updated(Integer result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

Doc from org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Annotations
@Override