net.sf.cindy.session.nio
Class PipeSession

java.lang.Object
  extended by net.sf.cindy.session.AbstractSession
      extended by net.sf.cindy.session.nio.AbstractChannelSession
          extended by net.sf.cindy.session.nio.PipeSession
All Implemented Interfaces:
Session

public class PipeSession
extends AbstractChannelSession

Pipe session.

Version:
$id$
Author:
Roger Chen

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.cindy.session.nio.AbstractChannelSession
AbstractChannelSession.ChannelReactorHandler
 
Constructor Summary
PipeSession()
           
 
Method Summary
protected  void doClose()
           
protected  void doStart()
           
 java.net.SocketAddress getLocalAddress()
          Get the local address which the session bind with.
 java.nio.channels.Pipe getPipe()
          Get pipe associted with the session.
protected  ReactorHandler getReactorHandler()
          Get reactor handler.
 java.net.SocketAddress getRemoteAddress()
          Get the remote address which the session connmected to.
 SessionType getSessionType()
          Get session type.
 void setPipe(java.nio.channels.Pipe pipe)
          Set the pipe which the session will used.
 
Methods inherited from class net.sf.cindy.session.nio.AbstractChannelSession
close, getReactor, isStarted, send, start
 
Methods inherited from class net.sf.cindy.session.AbstractSession
addSessionFilter, addSessionFilter, containsAttribute, dispatchException, flush, flush, getAttribute, getAttributes, getPacketDecoder, getPacketEncoder, getReadPacketSize, getSessionFilter, getSessionFilterChain, getSessionFilterChain, getSessionFilters, getSessionHandler, getSessionTimeout, removeAttribute, removeSessionFilter, send, send, setAttribute, setLocalAddress, setPacketDecoder, setPacketEncoder, setReadPacketSize, setRemoteAddress, setSessionHandler, setSessionTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeSession

public PipeSession()
Method Detail

setPipe

public void setPipe(java.nio.channels.Pipe pipe)
Set the pipe which the session will used.

Parameters:
pipe - pipe
Throws:
java.lang.IllegalStateException

getPipe

public java.nio.channels.Pipe getPipe()
Get pipe associted with the session.

Returns:
pipe

getSessionType

public SessionType getSessionType()
Description copied from interface: Session
Get session type.

Returns:
session type

getLocalAddress

public java.net.SocketAddress getLocalAddress()
Description copied from interface: Session
Get the local address which the session bind with.

Specified by:
getLocalAddress in interface Session
Overrides:
getLocalAddress in class AbstractSession
Returns:
the local address

getRemoteAddress

public java.net.SocketAddress getRemoteAddress()
Description copied from interface: Session
Get the remote address which the session connmected to.

Specified by:
getRemoteAddress in interface Session
Overrides:
getRemoteAddress in class AbstractSession
Returns:
the remote address

getReactorHandler

protected ReactorHandler getReactorHandler()
Description copied from class: AbstractChannelSession
Get reactor handler.

Specified by:
getReactorHandler in class AbstractChannelSession
Returns:
reactor handler

doStart

protected void doStart()
                throws java.io.IOException
Overrides:
doStart in class AbstractChannelSession
Throws:
java.io.IOException

doClose

protected void doClose()
Overrides:
doClose in class AbstractChannelSession