org.apache.mina.core.service
Interface IoProcessor<T extends IoSession>

Type Parameters:
T - the type of the IoSession this processor can handle
All Known Implementing Classes:
AbstractPollingIoProcessor, AprIoProcessor, NioProcessor, SimpleIoProcessorPool

public interface IoProcessor<T extends IoSession>

An internal interface to represent an 'I/O processor' that performs actual I/O operations for IoSessions. It abstracts existing reactor frameworks such as Java NIO once again to simplify transport implementations.

Version:
$Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Method Summary
 void add(T session)
          Adds the specified session to the I/O processor so that the I/O processor starts to perform any I/O operations related with the session.
 void dispose()
          Releases any resources allocated by this processor.
 void flush(T session)
          Flushes the internal write request queue of the specified session.
 boolean isDisposed()
          Returns true if and if only all resources of this processor have been disposed.
 boolean isDisposing()
          Returns true if and if only dispose() method has been called.
 void remove(T session)
          Removes and closes the specified session from the I/O processor so that the I/O processor closes the connection associated with the session and releases any other related resources.
 void updateTrafficMask(T session)
          Controls the traffic of the specified session as specified in IoSession.getTrafficMask().
 

Method Detail

isDisposing

boolean isDisposing()
Returns true if and if only dispose() method has been called. Please note that this method will return true even after all the related resources are released.


isDisposed

boolean isDisposed()
Returns true if and if only all resources of this processor have been disposed.


dispose

void dispose()
Releases any resources allocated by this processor. Please note that the resources might not be released as long as there are any sessions managed by this processor. Most implementations will close all sessions immediately and release the related resources.


add

void add(T session)
Adds the specified session to the I/O processor so that the I/O processor starts to perform any I/O operations related with the session.


flush

void flush(T session)
Flushes the internal write request queue of the specified session.


updateTrafficMask

void updateTrafficMask(T session)
Controls the traffic of the specified session as specified in IoSession.getTrafficMask().


remove

void remove(T session)
Removes and closes the specified session from the I/O processor so that the I/O processor closes the connection associated with the session and releases any other related resources.



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