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 theChannelwhich is associated with this event.Returns theChannelFuturewhich is associated with this event.longReturns 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:ChannelEventReturns theChannelwhich is associated with this event.- Specified by:
getChannelin interfaceChannelEvent
-
getFuture
Description copied from interface:ChannelEventReturns theChannelFuturewhich is associated with this event. If this event is an upstream event, this method will always return aSucceededChannelFuturebecause 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:
getFuturein interfaceChannelEvent
-
getWrittenAmount
public long getWrittenAmount()Description copied from interface:WriteCompletionEventReturns the amount of data written.- Specified by:
getWrittenAmountin interfaceWriteCompletionEvent- Returns:
- the number of written bytes or messages, depending on the type of the transport
-
toString
-