public class ConnectionFactoryNewConnectorImpl extends ConnectionFactory
ConnectionFactory type will create a new
for every call to
#connect(SocketAddress, SocketAddress, IoSessionInitializer).
This is a naive implementation that does not really take advantage of the asynchronous
operations in MINA since it is creating new threads for each socket operation.
|Modifier||Constructor and Description|
Create a new factory.
|Modifier and Type||Method and Description|
Connect to a remote socket.
Dispose of any resources that are held by the connection.
Delegates completely to
dispose, getFactory, getTimeout
protected ConnectionFactoryNewConnectorImpl(int timeoutInMillis)
public org.apache.mina.core.future.ConnectFuture connect(SocketAddress remoteAddress, org.apache.mina.core.session.IoSessionInitializer<? extends org.apache.mina.core.future.ConnectFuture> init, org.apache.mina.core.service.IoHandler handler)
Connect to a remote socket. If org.opennms.netmgt.provision.maxConcurrentConnections is set, this may block until a connection slot is available.
You must dispose both the
ConnectFuture when done
public org.apache.mina.core.future.ConnectFuture reConnect(SocketAddress remoteAddress, org.apache.mina.core.session.IoSessionInitializer<? extends org.apache.mina.core.future.ConnectFuture> init, org.apache.mina.core.service.IoHandler handler)
#connect(SocketAddress, SocketAddress, IoSessionInitializer, IoHandler)since we are recreating connectors during each invocation.
Copyright © 2020. All rights reserved.