Package org.ldaptive.transport.netty
Class NioConnectionTransport
java.lang.Object
org.ldaptive.transport.netty.ConnectionTransport
org.ldaptive.transport.netty.NioConnectionTransport
- All Implemented Interfaces:
Transport
Creates netty connections using an
NioEventLoopGroup
. 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
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionprotected 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>
Returns the socket channel type used with the event loop group.Methods inherited from class org.ldaptive.transport.netty.ConnectionTransport
create, toString
-
Constructor Details
-
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 Details
-
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
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
-