public class NettyPooledChannelFactory extends NettyChannelFactoryDecorator
NettyChannelFactory
which adds support for Channel
pooling.Constructor and Description |
---|
NettyPooledChannelFactory(NettyChannelFactory channelFactory)
Creates a new instance using the provided
NettyChannelFactory . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<io.netty.channel.Channel> |
create(Object data)
create.
|
CompletableFuture<io.netty.channel.Channel> |
create(Object data,
io.netty.channel.EventLoop eventLoop)
create.
|
NettyChannelFactory |
getChannelFactory()
getChannelFactory.
|
NettyChannelPoolFactory |
getChannelPoolFactory()
Getter for the field
channelPoolFactory . |
io.netty.channel.EventLoopGroup |
getExecutor()
getExecutor.
|
getBootstrap, getChannelInitializer, getOptions, getResolver, getTransportType, setChannelInitializer, setResolver
public NettyPooledChannelFactory(NettyChannelFactory channelFactory)
NettyChannelFactory
. A default NettyChannelPoolFactoryProvider
will be used to obtain a NettyChannelPoolFactory
channelFactory
- The NettyChannelFactory
that will be used to create Channel
instancespublic NettyChannelPoolFactory getChannelPoolFactory()
Getter for the field channelPoolFactory
.
NettyChannelPoolFactory
objectpublic CompletableFuture<io.netty.channel.Channel> create(Object data)
create.
create
in interface NettyChannelFactory
create
in class NettyChannelFactoryDecorator
data
- a Object
objectCompletableFuture
objectpublic NettyChannelFactory getChannelFactory()
getChannelFactory.
NettyChannelFactory
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
objectpublic io.netty.channel.EventLoopGroup getExecutor()
getExecutor.
getExecutor
in interface NettyChannelFactory
getExecutor
in class NettyChannelFactoryDecorator
EventLoopGroup
objectpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class NettyChannelFactoryDecorator
IOException
Copyright © 2016–2024. All rights reserved.