public class NettyContextChannelFactory extends NettyChannelFactoryDecorator
NettyChannelContext
for each acquired/created Channel
. Note that there is only one context assigned for each Channel
.Constructor and Description |
---|
NettyContextChannelFactory(NettyChannelFactory channelFactory)
Constructor for NettyContextChannelFactory.
|
NettyContextChannelFactory(NettyChannelFactory channelFactory,
NettyChannelContextFactory contextFactory)
Constructor for NettyContextChannelFactory.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<io.netty.channel.Channel> |
create(Object data)
create.
|
CompletableFuture<io.netty.channel.Channel> |
create(Object data,
io.netty.channel.EventLoop eventLoop)
create.
|
NettyChannelContextFactory |
getContextFactory()
Getter for the field
contextFactory . |
void |
setContextFactory(NettyChannelContextFactory contextFactory)
Setter for the field
contextFactory . |
close, getBootstrap, getChannelInitializer, getExecutor, getOptions, getResolver, getTransportType, setChannelInitializer, setResolver
public NettyContextChannelFactory(NettyChannelFactory channelFactory)
Constructor for NettyContextChannelFactory.
channelFactory
- a NettyChannelFactory
objectpublic NettyContextChannelFactory(NettyChannelFactory channelFactory, NettyChannelContextFactory contextFactory)
Constructor for NettyContextChannelFactory.
channelFactory
- a NettyChannelFactory
objectcontextFactory
- a NettyChannelContextFactory
objectpublic final NettyChannelContextFactory getContextFactory()
Getter for the field contextFactory
.
NettyChannelContextFactory
objectpublic CompletableFuture<io.netty.channel.Channel> create(Object data)
create.
create
in interface NettyChannelFactory
create
in class NettyChannelFactoryDecorator
data
- a Object
objectCompletableFuture
objectpublic final void setContextFactory(NettyChannelContextFactory contextFactory)
Setter for the field contextFactory
.
contextFactory
- a NettyChannelContextFactory
objectpublic CompletableFuture<io.netty.channel.Channel> create(Object data, io.netty.channel.EventLoop eventLoop)
create.
create
in interface NettyChannelFactory
create
in class NettyChannelFactoryDecorator
data
- a Object
objecteventLoop
- a EventLoop
objectCompletableFuture
objectCopyright © 2016–2024. All rights reserved.