|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.support.BaseIoService
org.apache.mina.common.support.BaseIoConnector
org.apache.mina.transport.socket.nio.ExistingSocketConnector
public class ExistingSocketConnector
IoConnector
for socket transport (TCP/IP).
Constructor Summary | |
---|---|
ExistingSocketConnector()
Create a connector with a single processing thread using a NewThreadExecutor |
|
ExistingSocketConnector(int processorCount,
edu.emory.mathcs.backport.java.util.concurrent.Executor executor)
Create a connector with the desired number of processing threads |
Method Summary | |
---|---|
org.apache.mina.common.ConnectFuture |
connect(SocketAddress address,
org.apache.mina.common.IoHandler handler,
org.apache.mina.common.IoServiceConfig config)
|
org.apache.mina.common.ConnectFuture |
connect(SocketAddress address,
SocketAddress localAddress,
org.apache.mina.common.IoHandler handler,
org.apache.mina.common.IoServiceConfig config)
|
org.apache.mina.common.IoServiceConfig |
getDefaultConfig()
|
int |
getWorkerTimeout()
How many seconds to keep the connection thread alive between connection requests |
void |
setDefaultConfig(org.apache.mina.transport.socket.nio.SocketConnectorConfig defaultConfig)
Sets the config this connector will use by default. |
void |
setOpenSocket(Socket openSocket)
|
void |
setWorkerTimeout(int workerTimeout)
Set how many seconds the connection worker thread should remain alive once idle before terminating itself. |
Methods inherited from class org.apache.mina.common.support.BaseIoConnector |
---|
connect, connect |
Methods inherited from class org.apache.mina.common.support.BaseIoService |
---|
addListener, getFilterChain, getFilterChainBuilder, getListeners, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.mina.common.IoService |
---|
addListener, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder |
Constructor Detail |
---|
public ExistingSocketConnector()
public ExistingSocketConnector(int processorCount, edu.emory.mathcs.backport.java.util.concurrent.Executor executor)
processorCount
- Number of processing threadsexecutor
- Executor to use for launching threadsMethod Detail |
---|
public int getWorkerTimeout()
public void setWorkerTimeout(int workerTimeout)
workerTimeout
- Number of seconds to keep thread alive. Must be >=0public org.apache.mina.common.ConnectFuture connect(SocketAddress address, org.apache.mina.common.IoHandler handler, org.apache.mina.common.IoServiceConfig config)
public org.apache.mina.common.ConnectFuture connect(SocketAddress address, SocketAddress localAddress, org.apache.mina.common.IoHandler handler, org.apache.mina.common.IoServiceConfig config)
public org.apache.mina.common.IoServiceConfig getDefaultConfig()
public void setDefaultConfig(org.apache.mina.transport.socket.nio.SocketConnectorConfig defaultConfig)
defaultConfig
- the default config.
NullPointerException
- if the specified value is null
.public void setOpenSocket(Socket openSocket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |