public abstract class AbstractNettyChannelFactory extends Object implements NettyChannelFactory
Channel factories utilitizing netty's Bootstrap| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNettyChannelFactory(TransportType type,
Options options,
NettyPropertyResolver resolver)
Constructor for AbstractNettyChannelFactory.
|
protected |
AbstractNettyChannelFactory(TransportType type,
Options options,
NettyPropertyResolver resolver,
NettyChannelInitializer initializer)
Constructor for AbstractNettyChannelFactory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
configureBootstrap(io.netty.bootstrap.Bootstrap bootstrap)
configureBootstrap.
|
CompletableFuture<io.netty.channel.Channel> |
create(Object data)
create.
|
CompletableFuture<io.netty.channel.Channel> |
create(Object data,
io.netty.channel.EventLoop eventLoop)
create.
|
protected io.netty.channel.RecvByteBufAllocator |
createRecvByteBufAllocator()
createRecvByteBufAllocator.
|
io.netty.bootstrap.Bootstrap |
getBootstrap()
getBootstrap.
|
NettyChannelInitializer |
getChannelInitializer()
getChannelInitializer.
|
io.netty.channel.EventLoopGroup |
getExecutor()
getExecutor.
|
Options |
getOptions()
getOptions.
|
NettyPropertyResolver |
getResolver()
getResolver.
|
TransportType |
getTransportType()
getTransportType.
|
protected io.netty.channel.EventLoopGroup |
initializeEventLoopGroup(@NotNull Class<? extends io.netty.channel.Channel> channelClass,
@NotNull ExecutorService executorService)
Initialize
EventLoopGroup. |
protected abstract CompletableFuture<io.netty.channel.Channel> |
newChannel(Object data)
newChannel.
|
void |
setChannelInitializer(NettyChannelInitializer channelInitializer)
setChannelInitializer.
|
void |
setResolver(NettyPropertyResolver resolver)
setResolver.
|
protected AbstractNettyChannelFactory(TransportType type, Options options, NettyPropertyResolver resolver)
Constructor for AbstractNettyChannelFactory.
type - a TransportType objectoptions - a Options objectresolver - a NettyPropertyResolver objectprotected AbstractNettyChannelFactory(TransportType type, Options options, NettyPropertyResolver resolver, NettyChannelInitializer initializer)
Constructor for AbstractNettyChannelFactory.
type - a TransportType objectoptions - a Options objectresolver - a NettyPropertyResolver objectinitializer - a NettyChannelInitializer objectprotected io.netty.channel.EventLoopGroup initializeEventLoopGroup(@NotNull
@NotNull Class<? extends io.netty.channel.Channel> channelClass,
@NotNull
@NotNull ExecutorService executorService)
Initialize EventLoopGroup.
channelClass - a Class objectexecutorService - a ExecutorService objectEventLoopGroup objectprotected abstract CompletableFuture<io.netty.channel.Channel> newChannel(Object data)
newChannel.
data - a Object objectCompletableFuture objectpublic final CompletableFuture<io.netty.channel.Channel> create(Object data)
create.
create in interface NettyChannelFactorydata - a Object objectCompletableFuture objectprotected void configureBootstrap(io.netty.bootstrap.Bootstrap bootstrap)
configureBootstrap.
bootstrap - a Bootstrap objectpublic final CompletableFuture<io.netty.channel.Channel> create(Object data, io.netty.channel.EventLoop eventLoop)
create.
create in interface NettyChannelFactorydata - a Object objecteventLoop - a EventLoop objectCompletableFuture objectprotected io.netty.channel.RecvByteBufAllocator createRecvByteBufAllocator()
createRecvByteBufAllocator.
RecvByteBufAllocator objectpublic TransportType getTransportType()
getTransportType.
getTransportType in interface NettyChannelFactoryTransportType objectpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic NettyChannelInitializer getChannelInitializer()
getChannelInitializer.
getChannelInitializer in interface NettyChannelFactoryNettyChannelInitializer objectpublic void setChannelInitializer(NettyChannelInitializer channelInitializer)
setChannelInitializer.
setChannelInitializer in interface NettyChannelFactorychannelInitializer - a NettyChannelInitializer objectpublic NettyPropertyResolver getResolver()
getResolver.
getResolver in interface NettyChannelFactoryNettyPropertyResolver objectpublic void setResolver(NettyPropertyResolver resolver)
setResolver.
setResolver in interface NettyChannelFactoryresolver - a NettyPropertyResolver objectpublic io.netty.channel.EventLoopGroup getExecutor()
getExecutor.
getExecutor in interface NettyChannelFactoryEventLoopGroup objectpublic io.netty.bootstrap.Bootstrap getBootstrap()
getBootstrap.
getBootstrap in interface NettyChannelFactoryBootstrap objectpublic Options getOptions()
getOptions.
getOptions in interface NettyChannelFactoryOptions objectCopyright © 2016–2024. All rights reserved.