Package org.ldaptive.transport.netty
Class NettyConnectionFactoryTransport
- java.lang.Object
-
- org.ldaptive.transport.netty.NettyConnectionFactoryTransport
-
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
ConnectionFactoryTransport,NioConnectionFactoryTransport,NioSingletonTransport,SingletonTransport
public class NettyConnectionFactoryTransport extends java.lang.Object implements Transport
Creates netty connections with configured event loops. This implementation reuses the same event loops for each connection created.- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerloggerLogger for this class.
-
Constructor Summary
Constructors Constructor Description NettyConnectionFactoryTransport(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup)Creates a new netty connection factory transport.NettyConnectionFactoryTransport(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup, io.netty.channel.EventLoopGroup messageGroup)Creates a new netty connection factory transport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free any resources associated with this transport.Connectioncreate(ConnectionConfig cc)Create a connection object.voidsetShutdownOnClose(boolean b)Sets whether to shutdown the event loop groups on close.java.lang.StringtoString()
-
-
-
Constructor Detail
-
NettyConnectionFactoryTransport
public NettyConnectionFactoryTransport(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup)Creates a new netty connection factory transport.- Parameters:
type- of channelioGroup- event loop group to handle I/O
-
NettyConnectionFactoryTransport
public NettyConnectionFactoryTransport(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup, io.netty.channel.EventLoopGroup messageGroup)Creates a new netty connection factory transport.- Parameters:
type- of channelioGroup- event loop group to handle I/OmessageGroup- event loop group to handle inbound messages, can be null
-
-
Method Detail
-
setShutdownOnClose
public void setShutdownOnClose(boolean b)
Sets whether to shutdown the event loop groups on close.- Parameters:
b- whether to shutdown on close
-
create
public Connection create(ConnectionConfig cc)
Description copied from interface:TransportCreate a connection object. Implementations should not open a TCP socket in this method.
-
close
public void close()
Description copied from interface:TransportFree any resources associated with this transport.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-