org.apache.mina.transport.socket.apr
Class AprSocketConnector

java.lang.Object
  extended by org.apache.mina.common.AbstractIoService
      extended by org.apache.mina.common.AbstractIoConnector
          extended by org.apache.mina.common.AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
              extended by org.apache.mina.transport.socket.apr.AprSocketConnector
All Implemented Interfaces:
IoConnector, IoService, SocketConnector, SocketService

public final class AprSocketConnector
extends AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
implements SocketConnector

Version:
$Rev: 600804 $, $Date: 2007-12-04 07:43:01 +0100 (Tue, 04 Dec 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.mina.common.AbstractPollingIoConnector
AbstractPollingIoConnector.ConnectionRequest
 
Nested classes/interfaces inherited from class org.apache.mina.common.AbstractIoService
AbstractIoService.ServiceOperationFuture
 
Constructor Summary
AprSocketConnector()
           
AprSocketConnector(Executor executor, IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor)
           
AprSocketConnector(int processorCount)
           
AprSocketConnector(IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor)
           
 
Method Summary
protected  Iterator<Long> allHandles()
           
protected  void close(Long handle)
           
protected  boolean connect(Long handle, SocketAddress remoteAddress)
           
protected  AbstractPollingIoConnector.ConnectionRequest connectionRequest(Long handle)
           
protected  void destroy()
           
protected  boolean finishConnect(Long handle)
           
 InetSocketAddress getDefaultRemoteAddress()
          Returns the default remote address to connect to when no argument is specified in IoConnector.connect() method.
 SocketSessionConfig getSessionConfig()
          Returns the default configuration of the new IoSessions created by this service.
 TransportMetadata getTransportMetadata()
          Returns the TransportMetadata that this service runs on.
protected  void init()
           
protected  Long newHandle(SocketAddress localAddress)
           
protected  org.apache.mina.transport.socket.apr.AprSession newSession(IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor, Long handle)
           
protected  void register(Long handle, AbstractPollingIoConnector.ConnectionRequest request)
           
protected  boolean select(int timeout)
           
protected  Iterator<Long> selectedHandles()
           
 void setDefaultRemoteAddress(InetSocketAddress defaultRemoteAddress)
           
protected  void wakeup()
           
 
Methods inherited from class org.apache.mina.common.AbstractPollingIoConnector
connect0, dispose0
 
Methods inherited from class org.apache.mina.common.AbstractIoConnector
connect, connect, connect, connect, connect, connect, finishSessionInitialization0, getConnectTimeout, getConnectTimeoutMillis, setConnectTimeout, setDefaultRemoteAddress, toString
 
Methods inherited from class org.apache.mina.common.AbstractIoService
addListener, broadcast, decreaseScheduledWriteMessages, dispose, finishSessionInitialization, getActivationTime, getBothIdleCount, getBothIdleTime, getBothIdleTimeInMillis, getCumulativeManagedSessionCount, getFilterChain, getFilterChainBuilder, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLargestManagedSessionCount, getLargestReadBytesThroughput, getLargestReadMessagesThroughput, getLargestWrittenBytesThroughput, getLargestWrittenMessagesThroughput, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getListeners, getManagedSessionCount, getManagedSessions, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReaderIdleTime, getReaderIdleTimeInMillis, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleCount, getWriterIdleTime, getWriterIdleTimeInMillis, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, increaseReadBytes, increaseReadMessages, increaseScheduledWriteBytes, increaseScheduledWriteMessages, increaseWrittenBytes, increaseWrittenMessages, isActive, isBothIdle, isDisposed, isDisposing, isIdle, isReaderIdle, isWriterIdle, notifyIdleness, removeListener, setBothIdleTime, setFilterChainBuilder, setHandler, setIdleTime, setLastReadTime, setLastWriteTime, setReaderIdleTime, setSessionDataStructureFactory, setThroughputCalculationInterval, setWriterIdleTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.mina.common.IoService
addListener, broadcast, dispose, getActivationTime, getBothIdleCount, getBothIdleTime, getBothIdleTimeInMillis, getCumulativeManagedSessionCount, getFilterChain, getFilterChainBuilder, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLargestManagedSessionCount, getLargestReadBytesThroughput, getLargestReadMessagesThroughput, getLargestWrittenBytesThroughput, getLargestWrittenMessagesThroughput, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getManagedSessionCount, getManagedSessions, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReaderIdleTime, getReaderIdleTimeInMillis, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleCount, getWriterIdleTime, getWriterIdleTimeInMillis, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, isActive, isBothIdle, isDisposed, isDisposing, isIdle, isReaderIdle, isWriterIdle, removeListener, setBothIdleTime, setFilterChainBuilder, setHandler, setIdleTime, setReaderIdleTime, setSessionDataStructureFactory, setThroughputCalculationInterval, setWriterIdleTime
 
Methods inherited from interface org.apache.mina.common.IoConnector
connect, connect, connect, connect, connect, connect, getConnectTimeout, getConnectTimeoutMillis, setConnectTimeout, setDefaultRemoteAddress
 
Methods inherited from interface org.apache.mina.common.IoService
addListener, broadcast, dispose, getActivationTime, getBothIdleCount, getBothIdleTime, getBothIdleTimeInMillis, getCumulativeManagedSessionCount, getFilterChain, getFilterChainBuilder, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLargestManagedSessionCount, getLargestReadBytesThroughput, getLargestReadMessagesThroughput, getLargestWrittenBytesThroughput, getLargestWrittenMessagesThroughput, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getManagedSessionCount, getManagedSessions, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReaderIdleTime, getReaderIdleTimeInMillis, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleCount, getWriterIdleTime, getWriterIdleTimeInMillis, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, isActive, isBothIdle, isDisposed, isDisposing, isIdle, isReaderIdle, isWriterIdle, removeListener, setBothIdleTime, setFilterChainBuilder, setHandler, setIdleTime, setReaderIdleTime, setSessionDataStructureFactory, setThroughputCalculationInterval, setWriterIdleTime
 

Constructor Detail

AprSocketConnector

public AprSocketConnector()

AprSocketConnector

public AprSocketConnector(int processorCount)

AprSocketConnector

public AprSocketConnector(IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor)

AprSocketConnector

public AprSocketConnector(Executor executor,
                          IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor)
Method Detail

init

protected void init()
             throws Exception
Specified by:
init in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

destroy

protected void destroy()
                throws Exception
Specified by:
destroy in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

allHandles

protected Iterator<Long> allHandles()
Specified by:
allHandles in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>

connect

protected boolean connect(Long handle,
                          SocketAddress remoteAddress)
                   throws Exception
Specified by:
connect in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

connectionRequest

protected AbstractPollingIoConnector.ConnectionRequest connectionRequest(Long handle)
Specified by:
connectionRequest in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>

close

protected void close(Long handle)
              throws Exception
Specified by:
close in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

finishConnect

protected boolean finishConnect(Long handle)
                         throws Exception
Specified by:
finishConnect in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

newHandle

protected Long newHandle(SocketAddress localAddress)
                  throws Exception
Specified by:
newHandle in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

newSession

protected org.apache.mina.transport.socket.apr.AprSession newSession(IoProcessor<org.apache.mina.transport.socket.apr.AprSession> processor,
                                                                     Long handle)
                                                              throws Exception
Specified by:
newSession in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

register

protected void register(Long handle,
                        AbstractPollingIoConnector.ConnectionRequest request)
                 throws Exception
Specified by:
register in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

select

protected boolean select(int timeout)
                  throws Exception
Specified by:
select in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>
Throws:
Exception

selectedHandles

protected Iterator<Long> selectedHandles()
Specified by:
selectedHandles in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>

wakeup

protected void wakeup()
Specified by:
wakeup in class AbstractPollingIoConnector<org.apache.mina.transport.socket.apr.AprSession,Long>

getTransportMetadata

public TransportMetadata getTransportMetadata()
Description copied from interface: IoService
Returns the TransportMetadata that this service runs on.

Specified by:
getTransportMetadata in interface IoService

getSessionConfig

public SocketSessionConfig getSessionConfig()
Description copied from interface: IoService
Returns the default configuration of the new IoSessions created by this service.

Specified by:
getSessionConfig in interface IoService
Specified by:
getSessionConfig in interface SocketService
Overrides:
getSessionConfig in class AbstractIoService

getDefaultRemoteAddress

public InetSocketAddress getDefaultRemoteAddress()
Description copied from interface: IoConnector
Returns the default remote address to connect to when no argument is specified in IoConnector.connect() method.

Specified by:
getDefaultRemoteAddress in interface IoConnector
Specified by:
getDefaultRemoteAddress in interface SocketConnector
Overrides:
getDefaultRemoteAddress in class AbstractIoConnector

setDefaultRemoteAddress

public void setDefaultRemoteAddress(InetSocketAddress defaultRemoteAddress)
Specified by:
setDefaultRemoteAddress in interface SocketConnector


Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.