Package org.jboss.netty.channel
Class DefaultChannelPipeline.DefaultChannelHandlerContext
java.lang.Object
org.jboss.netty.channel.DefaultChannelPipeline.DefaultChannelHandlerContext
- All Implemented Interfaces:
ChannelHandlerContext
- Enclosing class:
DefaultChannelPipeline
private final class DefaultChannelPipeline.DefaultChannelHandlerContext
extends Object
implements ChannelHandlerContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Objectprivate final booleanprivate final booleanprivate final ChannelHandlerprivate final String(package private) DefaultChannelPipeline.DefaultChannelHandlerContext(package private) DefaultChannelPipeline.DefaultChannelHandlerContext -
Constructor Summary
ConstructorsConstructorDescriptionDefaultChannelHandlerContext(DefaultChannelPipeline.DefaultChannelHandlerContext prev, DefaultChannelPipeline.DefaultChannelHandlerContext next, String name, ChannelHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanRetrieves an object which isattachedto this context.Returns theChannelthat theChannelPipelinebelongs to.Returns theChannelHandlerthat this context object is serving.getName()Returns the name of theChannelHandlerin theChannelPipeline.Returns theChannelPipelinethat theChannelHandlerbelongs to.voidSends the specifiedChannelEventto theChannelDownstreamHandlerwhich is placed in the closest downstream from the handler associated with this context.voidSends the specifiedChannelEventto theChannelUpstreamHandlerwhich is placed in the closest upstream from the handler associated with this context.voidsetAttachment(Object attachment) Attaches an object to this context to store a stateful information specific to theChannelHandlerwhich is associated with this context.
-
Field Details
-
next
-
prev
-
name
-
handler
-
canHandleUpstream
private final boolean canHandleUpstream -
canHandleDownstream
private final boolean canHandleDownstream -
attachment
-
-
Constructor Details
-
DefaultChannelHandlerContext
DefaultChannelHandlerContext(DefaultChannelPipeline.DefaultChannelHandlerContext prev, DefaultChannelPipeline.DefaultChannelHandlerContext next, String name, ChannelHandler handler)
-
-
Method Details
-
getChannel
Description copied from interface:ChannelHandlerContextReturns theChannelthat theChannelPipelinebelongs to. This method is a shortcut to getPipeline().getChannel().- Specified by:
getChannelin interfaceChannelHandlerContext
-
getPipeline
Description copied from interface:ChannelHandlerContextReturns theChannelPipelinethat theChannelHandlerbelongs to.- Specified by:
getPipelinein interfaceChannelHandlerContext
-
canHandleDownstream
public boolean canHandleDownstream()Description copied from interface:ChannelHandlerContext- Specified by:
canHandleDownstreamin interfaceChannelHandlerContext
-
canHandleUpstream
public boolean canHandleUpstream()Description copied from interface:ChannelHandlerContext- Specified by:
canHandleUpstreamin interfaceChannelHandlerContext
-
getHandler
Description copied from interface:ChannelHandlerContextReturns theChannelHandlerthat this context object is serving.- Specified by:
getHandlerin interfaceChannelHandlerContext
-
getName
Description copied from interface:ChannelHandlerContextReturns the name of theChannelHandlerin theChannelPipeline.- Specified by:
getNamein interfaceChannelHandlerContext
-
getAttachment
Description copied from interface:ChannelHandlerContextRetrieves an object which isattachedto this context.- Specified by:
getAttachmentin interfaceChannelHandlerContext- Returns:
nullif no object was attached ornullwas attached
-
setAttachment
Description copied from interface:ChannelHandlerContextAttaches an object to this context to store a stateful information specific to theChannelHandlerwhich is associated with this context.- Specified by:
setAttachmentin interfaceChannelHandlerContext
-
sendDownstream
Description copied from interface:ChannelHandlerContextSends the specifiedChannelEventto theChannelDownstreamHandlerwhich is placed in the closest downstream from the handler associated with this context. It is recommended to use the shortcut methods inChannelsrather than calling this method directly.- Specified by:
sendDownstreamin interfaceChannelHandlerContext
-
sendUpstream
Description copied from interface:ChannelHandlerContextSends the specifiedChannelEventto theChannelUpstreamHandlerwhich is placed in the closest upstream from the handler associated with this context. It is recommended to use the shortcut methods inChannelsrather than calling this method directly.- Specified by:
sendUpstreamin interfaceChannelHandlerContext
-