Package org.jboss.netty.channel
Class AbstractChannelSink
- java.lang.Object
-
- org.jboss.netty.channel.AbstractChannelSink
-
- All Implemented Interfaces:
ChannelSink
- Direct Known Subclasses:
AbstractNioChannelSink,AbstractOioChannelSink,HttpTunnelingClientSocketPipelineSink,LocalClientChannelSink,LocalServerChannelSink
public abstract class AbstractChannelSink extends java.lang.Object implements ChannelSink
A skeletalChannelSinkimplementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractChannelSink()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionCaught(ChannelPipeline pipeline, ChannelEvent event, ChannelPipelineException cause)Sends anExceptionEventupstream with the specifiedcause.ChannelFutureexecute(ChannelPipeline pipeline, java.lang.Runnable task)This implementation just directly callRunnable.run().protected booleanisFireExceptionCaughtLater(ChannelEvent event, java.lang.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.netty.channel.ChannelSink
eventSunk
-
-
-
-
Method Detail
-
exceptionCaught
public void exceptionCaught(ChannelPipeline pipeline, ChannelEvent event, ChannelPipelineException cause) throws java.lang.Exception
Sends anExceptionEventupstream with the specifiedcause.- Specified by:
exceptionCaughtin interfaceChannelSink- Parameters:
event- theChannelEventwhich caused aChannelHandlerto raise an exceptioncause- the exception raised by aChannelHandler- Throws:
java.lang.Exception
-
isFireExceptionCaughtLater
protected boolean isFireExceptionCaughtLater(ChannelEvent event, java.lang.Throwable actualCause)
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
public ChannelFuture execute(ChannelPipeline pipeline, java.lang.Runnable task)
This implementation just directly callRunnable.run(). Sub-classes should override this if they can handle it in a better way- Specified by:
executein interfaceChannelSink
-
-