public abstract class AbstractChannelSink extends Object implements ChannelSink
ChannelSink
implementation.Modifier | Constructor and Description |
---|---|
protected |
AbstractChannelSink()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
exceptionCaught(ChannelPipeline pipeline,
ChannelEvent event,
ChannelPipelineException cause)
Sends an
ExceptionEvent upstream with the specified
cause . |
ChannelFuture |
execute(ChannelPipeline pipeline,
Runnable task)
This implementation just directly call
Runnable.run() . |
protected boolean |
isFireExceptionCaughtLater(ChannelEvent event,
Throwable actualCause)
Returns
true if and only if the specified actualCause , which was raised while
handling the specified event , must trigger an exceptionCaught() event in
an I/O thread. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eventSunk
public void exceptionCaught(ChannelPipeline pipeline, ChannelEvent event, ChannelPipelineException cause) throws Exception
ExceptionEvent
upstream with the specified
cause
.exceptionCaught
in interface ChannelSink
event
- the ChannelEvent
which caused a
ChannelHandler
to raise an exceptioncause
- the exception raised by a ChannelHandler
Exception
protected boolean isFireExceptionCaughtLater(ChannelEvent event, Throwable actualCause)
true
if and only if the specified actualCause
, which was raised while
handling the specified event
, must trigger an exceptionCaught()
event in
an I/O thread.event
- the event which raised exceptionactualCause
- the raised exceptionpublic ChannelFuture execute(ChannelPipeline pipeline, Runnable task)
Runnable.run()
.
Sub-classes should override this if they can handle it in a better wayexecute
in interface ChannelSink
Copyright © 2008-2014 The Netty Project. All Rights Reserved.