Package org.jboss.netty.channel
Class DefaultWriteCompletionEvent
java.lang.Object
org.jboss.netty.channel.DefaultWriteCompletionEvent
- All Implemented Interfaces:
ChannelEvent
,WriteCompletionEvent
The default
WriteCompletionEvent
implementation.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultWriteCompletionEvent
(Channel channel, long writtenAmount) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns theChannel
which is associated with this event.Returns theChannelFuture
which is associated with this event.long
Returns the amount of data written.toString()
-
Field Details
-
channel
-
writtenAmount
private final long writtenAmount
-
-
Constructor Details
-
DefaultWriteCompletionEvent
Creates a new instance.
-
-
Method Details
-
getChannel
Description copied from interface:ChannelEvent
Returns theChannel
which is associated with this event.- Specified by:
getChannel
in interfaceChannelEvent
-
getFuture
Description copied from interface:ChannelEvent
Returns theChannelFuture
which is associated with this event. If this event is an upstream event, this method will always return aSucceededChannelFuture
because the event has occurred already. If this event is a downstream event (i.e. I/O request), the returned future will be notified when the I/O request succeeds or fails.- Specified by:
getFuture
in interfaceChannelEvent
-
getWrittenAmount
public long getWrittenAmount()Description copied from interface:WriteCompletionEvent
Returns the amount of data written.- Specified by:
getWrittenAmount
in interfaceWriteCompletionEvent
- Returns:
- the number of written bytes or messages, depending on the type of the transport
-
toString
-