org.apache.mina.transport.socket.nio
Class MultiThreadSocketSessionImpl

java.lang.Object
  extended by org.apache.mina.common.support.BaseIoSession
      extended by org.apache.mina.transport.socket.nio.MultiThreadSocketSessionImpl
All Implemented Interfaces:
org.apache.mina.common.IoSession

 class MultiThreadSocketSessionImpl
extends org.apache.mina.common.support.BaseIoSession

An IoSession for socket transport (TCP/IP).

Version:
$Rev: 619823 $, $Date: 2008-02-08 10:09:37 +0000 (Fri, 08 Feb 2008) $

Constructor Summary
MultiThreadSocketSessionImpl(org.apache.mina.common.IoService manager, org.apache.mina.transport.socket.nio.SocketIoProcessor ioProcessor, IoServiceListenerSupport listeners, org.apache.mina.common.IoServiceConfig serviceConfig, SocketChannel ch, org.apache.mina.common.IoHandler defaultHandler, SocketAddress serviceAddress)
          Creates a new instance.
 
Method Summary
(package private)  void awaitRegistration()
           
protected  void close0()
           
(package private)  boolean created()
           
(package private)  void doneCreation()
           
(package private)  SocketChannel getChannel()
           
 org.apache.mina.common.IoSessionConfig getConfig()
           
 org.apache.mina.common.IoFilterChain getFilterChain()
           
 org.apache.mina.common.IoHandler getHandler()
           
(package private)  org.apache.mina.transport.socket.nio.SocketIoProcessor getIoProcessor()
           
 SocketAddress getLocalAddress()
           
(package private)  int getReadBufferSize()
           
(package private)  SelectionKey getReadSelectionKey()
           
 SocketAddress getRemoteAddress()
           
 int getScheduledWriteBytes()
           
 int getScheduledWriteMessages()
          Deprecated.  
 int getScheduledWriteRequests()
           
(package private)  SelectionKey getSelectionKey()
           
 org.apache.mina.common.IoService getService()
           
 SocketAddress getServiceAddress()
           
 org.apache.mina.common.IoServiceConfig getServiceConfig()
           
(package private)  IoServiceListenerSupport getServiceListeners()
           
 org.apache.mina.common.TransportType getTransportType()
           
(package private)  org.apache.mina.util.Queue getWriteRequestQueue()
           
(package private)  SelectionKey getWriteSelectionKey()
           
(package private)  void setSelectionKey(SelectionKey key)
           
(package private)  void setWriteSelectionKey(SelectionKey key)
           
protected  void updateTrafficMask()
           
protected  void write0(org.apache.mina.common.IoFilter.WriteRequest writeRequest)
           
 
Methods inherited from class org.apache.mina.common.support.BaseIoSession
close, containsAttribute, getAttachment, getAttribute, getAttributeKeys, getCloseFuture, getCreationTime, getIdleCount, getIdleTime, getIdleTimeInMillis, getLastIdleTime, getLastIoTime, getLastReadTime, getLastWriteTime, getReadBytes, getReadMessages, getTrafficMask, getWriteTimeout, getWriteTimeoutInMillis, getWrittenBytes, getWrittenMessages, getWrittenWriteRequests, increaseIdleCount, increaseReadBytes, increaseReadMessages, increaseWrittenBytes, increaseWrittenMessages, isClosing, isConnected, isIdle, removeAttribute, resumeRead, resumeWrite, setAttachment, setAttribute, setAttribute, setIdleTime, setTrafficMask, setWriteTimeout, suspendRead, suspendWrite, toString, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiThreadSocketSessionImpl

MultiThreadSocketSessionImpl(org.apache.mina.common.IoService manager,
                             org.apache.mina.transport.socket.nio.SocketIoProcessor ioProcessor,
                             IoServiceListenerSupport listeners,
                             org.apache.mina.common.IoServiceConfig serviceConfig,
                             SocketChannel ch,
                             org.apache.mina.common.IoHandler defaultHandler,
                             SocketAddress serviceAddress)
Creates a new instance.

Method Detail

awaitRegistration

void awaitRegistration()
                 throws InterruptedException
Throws:
InterruptedException

created

boolean created()
          throws InterruptedException
Throws:
InterruptedException

doneCreation

void doneCreation()

getService

public org.apache.mina.common.IoService getService()
Specified by:
getService in interface org.apache.mina.common.IoSession

getServiceConfig

public org.apache.mina.common.IoServiceConfig getServiceConfig()
Specified by:
getServiceConfig in interface org.apache.mina.common.IoSession

getConfig

public org.apache.mina.common.IoSessionConfig getConfig()
Specified by:
getConfig in interface org.apache.mina.common.IoSession

getIoProcessor

org.apache.mina.transport.socket.nio.SocketIoProcessor getIoProcessor()

getFilterChain

public org.apache.mina.common.IoFilterChain getFilterChain()
Specified by:
getFilterChain in interface org.apache.mina.common.IoSession

getChannel

SocketChannel getChannel()

getServiceListeners

IoServiceListenerSupport getServiceListeners()

getSelectionKey

SelectionKey getSelectionKey()

getReadSelectionKey

SelectionKey getReadSelectionKey()

getWriteSelectionKey

SelectionKey getWriteSelectionKey()

setSelectionKey

void setSelectionKey(SelectionKey key)

setWriteSelectionKey

void setWriteSelectionKey(SelectionKey key)

getHandler

public org.apache.mina.common.IoHandler getHandler()
Specified by:
getHandler in interface org.apache.mina.common.IoSession

close0

protected void close0()

getWriteRequestQueue

org.apache.mina.util.Queue getWriteRequestQueue()

getScheduledWriteMessages

public int getScheduledWriteMessages()
Deprecated. 

Returns:
int Number of write scheduled write requests

getScheduledWriteRequests

public int getScheduledWriteRequests()
Specified by:
getScheduledWriteRequests in interface org.apache.mina.common.IoSession

getScheduledWriteBytes

public int getScheduledWriteBytes()
Specified by:
getScheduledWriteBytes in interface org.apache.mina.common.IoSession

write0

protected void write0(org.apache.mina.common.IoFilter.WriteRequest writeRequest)

getTransportType

public org.apache.mina.common.TransportType getTransportType()
Specified by:
getTransportType in interface org.apache.mina.common.IoSession

getRemoteAddress

public SocketAddress getRemoteAddress()
Specified by:
getRemoteAddress in interface org.apache.mina.common.IoSession

getLocalAddress

public SocketAddress getLocalAddress()
Specified by:
getLocalAddress in interface org.apache.mina.common.IoSession

getServiceAddress

public SocketAddress getServiceAddress()
Specified by:
getServiceAddress in interface org.apache.mina.common.IoSession

updateTrafficMask

protected void updateTrafficMask()

getReadBufferSize

int getReadBufferSize()


Licensed to the Apache Software Foundation