public abstract class AbstractChannelSink extends java.lang.Object implements ChannelSink
ChannelSink
implementation.限定符 | 构造器和说明 |
---|---|
protected |
AbstractChannelSink()
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
void |
exceptionCaught(ChannelPipeline pipeline,
ChannelEvent event,
ChannelPipelineException cause)
Sends an
ExceptionEvent upstream with the specified
cause . |
ChannelFuture |
execute(ChannelPipeline pipeline,
java.lang.Runnable task)
This implementation just directly call
Runnable.run() . |
protected boolean |
isFireExceptionCaughtLater(ChannelEvent event,
java.lang.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 java.lang.Exception
ExceptionEvent
upstream with the specified
cause
.exceptionCaught
在接口中 ChannelSink
event
- the ChannelEvent
which caused a
ChannelHandler
to raise an exceptioncause
- the exception raised by a ChannelHandler
java.lang.Exception
protected boolean isFireExceptionCaughtLater(ChannelEvent event, java.lang.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, java.lang.Runnable task)
Runnable.run()
.
Sub-classes should override this if they can handle it in a better wayexecute
在接口中 ChannelSink