|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.mina.core.service.AbstractIoService
org.apache.mina.core.service.AbstractIoConnector
org.apache.mina.core.polling.AbstractPollingIoConnector<AprSession,java.lang.Long>
org.apache.mina.transport.socket.apr.AprSocketConnector
public final class AprSocketConnector
IoConnector for APR based socket transport (TCP/IP).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.mina.core.polling.AbstractPollingIoConnector |
|---|
AbstractPollingIoConnector.ConnectionRequest |
| Nested classes/interfaces inherited from class org.apache.mina.core.service.AbstractIoService |
|---|
AbstractIoService.ServiceOperationFuture |
| Field Summary |
|---|
| Fields inherited from class org.apache.mina.core.service.AbstractIoService |
|---|
disposalLock |
| Constructor Summary | |
|---|---|
AprSocketConnector()
Create an AprSocketConnector with default configuration (multiple thread model). |
|
AprSocketConnector(java.util.concurrent.Executor executor,
IoProcessor<AprSession> processor)
Constructor for AprSocketConnector with a given Executor for handling
connection events and a given IoProcessor for handling I/O events, useful for sharing
the same processor and executor over multiple IoService of the same type. |
|
AprSocketConnector(int processorCount)
Constructor for AprSocketConnector with default configuration, and
given number of AprIoProcessor for multithreading I/O operations |
|
AprSocketConnector(IoProcessor<AprSession> processor)
Constructor for AprSocketConnector with default configuration but a
specific IoProcessor, useful for sharing the same processor over multiple
IoService of the same type. |
|
| Method Summary | |
|---|---|
protected java.util.Iterator<java.lang.Long> |
allHandles()
|
protected void |
close(java.lang.Long handle)
|
protected boolean |
connect(java.lang.Long handle,
java.net.SocketAddress remoteAddress)
|
protected void |
destroy()
|
protected boolean |
finishConnect(java.lang.Long handle)
|
protected AbstractPollingIoConnector.ConnectionRequest |
getConnectionRequest(java.lang.Long handle)
|
java.net.InetSocketAddress |
getDefaultRemoteAddress()
|
SocketSessionConfig |
getSessionConfig()
|
TransportMetadata |
getTransportMetadata()
|
protected void |
init()
|
protected java.lang.Long |
newHandle(java.net.SocketAddress localAddress)
|
protected AprSession |
newSession(IoProcessor<AprSession> processor,
java.lang.Long handle)
|
protected void |
register(java.lang.Long handle,
AbstractPollingIoConnector.ConnectionRequest request)
|
protected int |
select(int timeout)
|
protected java.util.Iterator<java.lang.Long> |
selectedHandles()
|
void |
setDefaultRemoteAddress(java.net.InetSocketAddress defaultRemoteAddress)
|
protected void |
wakeup()
|
| Methods inherited from class org.apache.mina.core.polling.AbstractPollingIoConnector |
|---|
connect0, dispose0 |
| Methods inherited from class org.apache.mina.core.service.AbstractIoConnector |
|---|
connect, connect, connect, connect, connect, connect, finishSessionInitialization0, getConnectTimeout, getConnectTimeoutCheckInterval, getConnectTimeoutMillis, setConnectTimeout, setConnectTimeoutCheckInterval, setConnectTimeoutMillis, setDefaultRemoteAddress, toString |
| Methods inherited from class org.apache.mina.core.service.AbstractIoService |
|---|
addListener, broadcast, dispose, dispose, executeWorker, executeWorker, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getListeners, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, initSession, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.mina.core.service.IoConnector |
|---|
connect, connect, connect, connect, connect, connect, getConnectTimeout, getConnectTimeoutMillis, setConnectTimeout, setConnectTimeoutMillis, setDefaultRemoteAddress |
| Methods inherited from interface org.apache.mina.core.service.IoService |
|---|
addListener, broadcast, dispose, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory |
| Constructor Detail |
|---|
public AprSocketConnector()
AprSocketConnector with default configuration (multiple thread model).
public AprSocketConnector(int processorCount)
AprSocketConnector with default configuration, and
given number of AprIoProcessor for multithreading I/O operations
processorCount - the number of processor to create and place in a
SimpleIoProcessorPoolpublic AprSocketConnector(IoProcessor<AprSession> processor)
AprSocketConnector with default configuration but a
specific IoProcessor, useful for sharing the same processor over multiple
IoService of the same type.
processor - the processor to use for managing I/O events
public AprSocketConnector(java.util.concurrent.Executor executor,
IoProcessor<AprSession> processor)
AprSocketConnector with a given Executor for handling
connection events and a given IoProcessor for handling I/O events, useful for sharing
the same processor and executor over multiple IoService of the same type.
executor - the executor for connectionprocessor - the processor for I/O operations| Method Detail |
|---|
protected void init()
throws java.lang.Exception
init in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected void destroy()
throws java.lang.Exception
destroy in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exceptionprotected java.util.Iterator<java.lang.Long> allHandles()
allHandles in class AbstractPollingIoConnector<AprSession,java.lang.Long>
protected boolean connect(java.lang.Long handle,
java.net.SocketAddress remoteAddress)
throws java.lang.Exception
connect in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exceptionprotected AbstractPollingIoConnector.ConnectionRequest getConnectionRequest(java.lang.Long handle)
getConnectionRequest in class AbstractPollingIoConnector<AprSession,java.lang.Long>
protected void close(java.lang.Long handle)
throws java.lang.Exception
close in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected boolean finishConnect(java.lang.Long handle)
throws java.lang.Exception
finishConnect in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected java.lang.Long newHandle(java.net.SocketAddress localAddress)
throws java.lang.Exception
newHandle in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected AprSession newSession(IoProcessor<AprSession> processor,
java.lang.Long handle)
throws java.lang.Exception
newSession in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected void register(java.lang.Long handle,
AbstractPollingIoConnector.ConnectionRequest request)
throws java.lang.Exception
register in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exception
protected int select(int timeout)
throws java.lang.Exception
select in class AbstractPollingIoConnector<AprSession,java.lang.Long>java.lang.Exceptionprotected java.util.Iterator<java.lang.Long> selectedHandles()
selectedHandles in class AbstractPollingIoConnector<AprSession,java.lang.Long>protected void wakeup()
wakeup in class AbstractPollingIoConnector<AprSession,java.lang.Long>public TransportMetadata getTransportMetadata()
getTransportMetadata in interface IoServicepublic SocketSessionConfig getSessionConfig()
getSessionConfig in interface IoServicegetSessionConfig in interface SocketConnectorgetSessionConfig in class AbstractIoServicepublic java.net.InetSocketAddress getDefaultRemoteAddress()
getDefaultRemoteAddress in interface IoConnectorgetDefaultRemoteAddress in interface SocketConnectorgetDefaultRemoteAddress in class AbstractIoConnectorpublic void setDefaultRemoteAddress(java.net.InetSocketAddress defaultRemoteAddress)
setDefaultRemoteAddress in interface SocketConnector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||