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

java.lang.Object
  extended by org.apache.mina.core.polling.AbstractPollingIoProcessor<AprSession>
      extended by org.apache.mina.transport.socket.apr.AprIoProcessor
All Implemented Interfaces:
IoProcessor<AprSession>

public final class AprIoProcessor
extends AbstractPollingIoProcessor<AprSession>

The class in charge of processing socket level IO events for the AprSocketConnector

Author:
Apache MINA Project

Field Summary
 
Fields inherited from class org.apache.mina.core.polling.AbstractPollingIoProcessor
wakeupCalled
 
Constructor Summary
AprIoProcessor(java.util.concurrent.Executor executor)
          Create a new instance of AprIoProcessor with a given Exector for handling I/Os events.
 
Method Summary
protected  java.util.Iterator<AprSession> allSessions()
          
protected  void destroy(AprSession session)
          
protected  void doDispose()
          
protected  SessionState getState(AprSession session)
          
protected  void init(AprSession session)
           
protected  boolean isBrokenConnection()
          
protected  boolean isInterestedInRead(AprSession session)
          
protected  boolean isInterestedInWrite(AprSession session)
          
protected  boolean isReadable(AprSession session)
          
protected  boolean isSelectorEmpty()
          
protected  boolean isWritable(AprSession session)
          
protected  int read(AprSession session, IoBuffer buffer)
          
protected  void registerNewSelector()
          
protected  int select()
          
protected  int select(long timeout)
          
protected  java.util.Iterator<AprSession> selectedSessions()
          
protected  void setInterestedInRead(AprSession session, boolean isInterested)
          
protected  void setInterestedInWrite(AprSession session, boolean isInterested)
          
protected  int transferFile(AprSession session, FileRegion region, int length)
          
protected  void wakeup()
          
protected  int write(AprSession session, IoBuffer buf, int length)
          
 
Methods inherited from class org.apache.mina.core.polling.AbstractPollingIoProcessor
add, dispose, flush, isDisposed, isDisposing, remove, updateTrafficControl, updateTrafficMask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AprIoProcessor

public AprIoProcessor(java.util.concurrent.Executor executor)
Create a new instance of AprIoProcessor with a given Exector for handling I/Os events.

Parameters:
executor - the Executor for handling I/O events
Method Detail

doDispose

protected void doDispose()

Specified by:
doDispose in class AbstractPollingIoProcessor<AprSession>

select

protected int select()
              throws java.lang.Exception

Specified by:
select in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

select

protected int select(long timeout)
              throws java.lang.Exception

Specified by:
select in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

isSelectorEmpty

protected boolean isSelectorEmpty()

Specified by:
isSelectorEmpty in class AbstractPollingIoProcessor<AprSession>

wakeup

protected void wakeup()

Specified by:
wakeup in class AbstractPollingIoProcessor<AprSession>

allSessions

protected java.util.Iterator<AprSession> allSessions()

Specified by:
allSessions in class AbstractPollingIoProcessor<AprSession>

selectedSessions

protected java.util.Iterator<AprSession> selectedSessions()

Specified by:
selectedSessions in class AbstractPollingIoProcessor<AprSession>

init

protected void init(AprSession session)
             throws java.lang.Exception
Specified by:
init in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

destroy

protected void destroy(AprSession session)
                throws java.lang.Exception

Specified by:
destroy in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

getState

protected SessionState getState(AprSession session)

Specified by:
getState in class AbstractPollingIoProcessor<AprSession>

isReadable

protected boolean isReadable(AprSession session)

Specified by:
isReadable in class AbstractPollingIoProcessor<AprSession>

isWritable

protected boolean isWritable(AprSession session)

Specified by:
isWritable in class AbstractPollingIoProcessor<AprSession>

isInterestedInRead

protected boolean isInterestedInRead(AprSession session)

Specified by:
isInterestedInRead in class AbstractPollingIoProcessor<AprSession>

isInterestedInWrite

protected boolean isInterestedInWrite(AprSession session)

Specified by:
isInterestedInWrite in class AbstractPollingIoProcessor<AprSession>

setInterestedInRead

protected void setInterestedInRead(AprSession session,
                                   boolean isInterested)
                            throws java.lang.Exception

Specified by:
setInterestedInRead in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

setInterestedInWrite

protected void setInterestedInWrite(AprSession session,
                                    boolean isInterested)
                             throws java.lang.Exception

Specified by:
setInterestedInWrite in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

read

protected int read(AprSession session,
                   IoBuffer buffer)
            throws java.lang.Exception

Specified by:
read in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

write

protected int write(AprSession session,
                    IoBuffer buf,
                    int length)
             throws java.lang.Exception

Specified by:
write in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

transferFile

protected int transferFile(AprSession session,
                           FileRegion region,
                           int length)
                    throws java.lang.Exception

Specified by:
transferFile in class AbstractPollingIoProcessor<AprSession>
Throws:
java.lang.Exception

registerNewSelector

protected void registerNewSelector()

Specified by:
registerNewSelector in class AbstractPollingIoProcessor<AprSession>

isBrokenConnection

protected boolean isBrokenConnection()
                              throws java.io.IOException

Specified by:
isBrokenConnection in class AbstractPollingIoProcessor<AprSession>
Throws:
java.io.IOException


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