Package org.ldaptive.transport.netty
Class NioConnectionTransport
- java.lang.Object
-
- org.ldaptive.transport.netty.ConnectionTransport
-
- org.ldaptive.transport.netty.NioConnectionTransport
-
- All Implemented Interfaces:
Transport
public class NioConnectionTransport extends ConnectionTransport
Creates netty connections using anNioEventLoopGroup
. The event loop group is shutdown when the connection is closed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldaptive.transport.netty.ConnectionTransport
ConnectionTransport.DualThread, ConnectionTransport.SingleThread
-
-
Field Summary
-
Fields inherited from class org.ldaptive.transport.netty.ConnectionTransport
logger
-
-
Constructor Summary
Constructors Constructor Description NioConnectionTransport()
Creates a new nio connection transport.NioConnectionTransport(int ioThreads)
Creates a new nio connection transport.NioConnectionTransport(int ioThreads, int messageThreads)
Creates a new nio connection transport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.netty.channel.EventLoopGroup
createEventLoopGroup(String name, int numThreads)
Returns a new event loop group with the supplied name and number of threads.protected Class<? extends io.netty.channel.Channel>
getSocketChannelType()
Returns the socket channel type used with the event loop group.-
Methods inherited from class org.ldaptive.transport.netty.ConnectionTransport
create, toString
-
-
-
-
Constructor Detail
-
NioConnectionTransport
public NioConnectionTransport()
Creates a new nio connection transport.
-
NioConnectionTransport
public NioConnectionTransport(int ioThreads)
Creates a new nio connection transport.- Parameters:
ioThreads
- number of threads used for I/O in the event loop group
-
NioConnectionTransport
public NioConnectionTransport(int ioThreads, int messageThreads)
Creates a new nio connection transport.- Parameters:
ioThreads
- number of threads used for I/O in the event loop groupmessageThreads
- number of threads for LDAP message handling in the event loop group
-
-
Method Detail
-
getSocketChannelType
protected Class<? extends io.netty.channel.Channel> getSocketChannelType()
Description copied from class:ConnectionTransport
Returns the socket channel type used with the event loop group.- Overrides:
getSocketChannelType
in classConnectionTransport
- Returns:
- socket channel type
-
createEventLoopGroup
protected io.netty.channel.EventLoopGroup createEventLoopGroup(String name, int numThreads)
Description copied from class:ConnectionTransport
Returns a new event loop group with the supplied name and number of threads.- Overrides:
createEventLoopGroup
in classConnectionTransport
- Parameters:
name
- of the event loop groupnumThreads
- number of worker threads- Returns:
- new event loop group
-
-