public class NettyStreamFactory extends java.lang.Object implements StreamFactory
Modifier and Type | Field and Description |
---|---|
private io.netty.buffer.ByteBufAllocator |
allocator |
private io.netty.channel.EventLoopGroup |
eventLoopGroup |
private SocketSettings |
settings |
private java.lang.Class<? extends io.netty.channel.socket.SocketChannel> |
socketChannelClass |
private SslSettings |
sslSettings |
Constructor and Description |
---|
NettyStreamFactory(SocketSettings settings,
SslSettings sslSettings)
Construct a new instance of the factory with a default allocator, nio event loop group and nio socket channel.
|
NettyStreamFactory(SocketSettings settings,
SslSettings sslSettings,
io.netty.channel.EventLoopGroup eventLoopGroup)
Construct a new instance of the factory.
|
NettyStreamFactory(SocketSettings settings,
SslSettings sslSettings,
io.netty.channel.EventLoopGroup eventLoopGroup,
io.netty.buffer.ByteBufAllocator allocator)
Construct a new instance of the factory.
|
NettyStreamFactory(SocketSettings settings,
SslSettings sslSettings,
io.netty.channel.EventLoopGroup eventLoopGroup,
java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass,
io.netty.buffer.ByteBufAllocator allocator)
Construct a new instance of the factory.
|
Modifier and Type | Method and Description |
---|---|
Stream |
create(ServerAddress serverAddress)
Create a Stream to the given address
|
private final SocketSettings settings
private final SslSettings sslSettings
private final io.netty.channel.EventLoopGroup eventLoopGroup
private final java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass
private final io.netty.buffer.ByteBufAllocator allocator
public NettyStreamFactory(SocketSettings settings, SslSettings sslSettings, io.netty.channel.EventLoopGroup eventLoopGroup, java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass, io.netty.buffer.ByteBufAllocator allocator)
settings
- the socket settingssslSettings
- the SSL settingseventLoopGroup
- the event loop group that all channels created by this factory will be a part ofsocketChannelClass
- the socket channel classallocator
- the allocator to use for ByteBuf instancespublic NettyStreamFactory(SocketSettings settings, SslSettings sslSettings, io.netty.channel.EventLoopGroup eventLoopGroup, io.netty.buffer.ByteBufAllocator allocator)
settings
- the socket settingssslSettings
- the SSL settingseventLoopGroup
- the event loop group that all channels created by this factory will be a part ofallocator
- the allocator to use for ByteBuf instancespublic NettyStreamFactory(SocketSettings settings, SslSettings sslSettings, io.netty.channel.EventLoopGroup eventLoopGroup)
settings
- the socket settingssslSettings
- the SSL settingseventLoopGroup
- the event loop group that all channels created by this factory will be a part ofpublic NettyStreamFactory(SocketSettings settings, SslSettings sslSettings)
settings
- the socket settingssslSettings
- the SSL settingspublic Stream create(ServerAddress serverAddress)
StreamFactory
create
in interface StreamFactory
serverAddress
- the address