Package org.jboss.netty.channel
Class DefaultWriteCompletionEvent
- java.lang.Object
-
- org.jboss.netty.channel.DefaultWriteCompletionEvent
-
- All Implemented Interfaces:
ChannelEvent,WriteCompletionEvent
public class DefaultWriteCompletionEvent extends java.lang.Object implements WriteCompletionEvent
The defaultWriteCompletionEventimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description private Channelchannelprivate longwrittenAmount
-
Constructor Summary
Constructors Constructor Description DefaultWriteCompletionEvent(Channel channel, long writtenAmount)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelgetChannel()Returns theChannelwhich is associated with this event.ChannelFuturegetFuture()Returns theChannelFuturewhich is associated with this event.longgetWrittenAmount()Returns the amount of data written.java.lang.StringtoString()
-
-
-
Field Detail
-
channel
private final Channel channel
-
writtenAmount
private final long writtenAmount
-
-
Constructor Detail
-
DefaultWriteCompletionEvent
public DefaultWriteCompletionEvent(Channel channel, long writtenAmount)
Creates a new instance.
-
-
Method Detail
-
getChannel
public Channel getChannel()
Description copied from interface:ChannelEventReturns theChannelwhich is associated with this event.- Specified by:
getChannelin interfaceChannelEvent
-
getFuture
public ChannelFuture 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-