Class AbstractChannelSink
java.lang.Object
org.jboss.netty.channel.AbstractChannelSink
- All Implemented Interfaces:
ChannelSink
- Direct Known Subclasses:
AbstractNioChannelSink, AbstractOioChannelSink, HttpTunnelingClientSocketPipelineSink, LocalClientChannelSink, LocalServerChannelSink
A skeletal
ChannelSink implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionCaught(ChannelPipeline pipeline, ChannelEvent event, ChannelPipelineException cause) Sends anExceptionEventupstream with the specifiedcause.execute(ChannelPipeline pipeline, Runnable task) This implementation just directly callRunnable.run().protected booleanisFireExceptionCaughtLater(ChannelEvent event, Throwable actualCause) Returnstrueif and only if the specifiedactualCause, which was raised while handling the specifiedevent, must trigger anexceptionCaught()event in an I/O thread.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChannelSink
eventSunk
-
Constructor Details
-
AbstractChannelSink
protected AbstractChannelSink()Creates a new instance.
-
-
Method Details
-
exceptionCaught
public void exceptionCaught(ChannelPipeline pipeline, ChannelEvent event, ChannelPipelineException cause) throws Exception Sends anExceptionEventupstream with the specifiedcause.- Specified by:
exceptionCaughtin interfaceChannelSink- Parameters:
event- theChannelEventwhich caused aChannelHandlerto raise an exceptioncause- the exception raised by aChannelHandler- Throws:
Exception
-
isFireExceptionCaughtLater
Returnstrueif and only if the specifiedactualCause, which was raised while handling the specifiedevent, must trigger anexceptionCaught()event in an I/O thread.- Parameters:
event- the event which raised exceptionactualCause- the raised exception
-
execute
This implementation just directly callRunnable.run(). Sub-classes should override this if they can handle it in a better way- Specified by:
executein interfaceChannelSink
-