Merge the attribute map of ChannelHandlerContext into Channel
- Fixes #2136
This commit is contained in:
parent
a69c4f2371
commit
13f508154a
@ -17,14 +17,15 @@ package io.netty.channel;
|
||||
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.channel.ChannelHandler.Skip;
|
||||
import io.netty.util.DefaultAttributeMap;
|
||||
import io.netty.util.Attribute;
|
||||
import io.netty.util.AttributeKey;
|
||||
import io.netty.util.concurrent.EventExecutor;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
final class DefaultChannelHandlerContext extends DefaultAttributeMap implements ChannelHandlerContext {
|
||||
final class DefaultChannelHandlerContext implements ChannelHandlerContext {
|
||||
|
||||
// This class keeps an integer member field 'skipFlags' whose each bit tells if the corresponding handler method
|
||||
// is annotated with @Skip. 'skipFlags' is retrieved in runtime via the reflection API and is cached.
|
||||
@ -279,6 +280,11 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Attribute<T> attr(AttributeKey<T> key) {
|
||||
return channel.attr(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelHandlerContext fireChannelRegistered() {
|
||||
DefaultChannelHandlerContext next = findContextInbound(MASK_CHANNEL_REGISTERED);
|
||||
|
Loading…
Reference in New Issue
Block a user