seda.sandStorm.lib.aSocket.nio
Class ListenSockState

java.lang.Object
  extended by seda.sandStorm.lib.aSocket.ListenSockState
      extended by seda.sandStorm.lib.aSocket.nio.ListenSockState

public class ListenSockState
extends ListenSockState

Internal class used to represent a server socket listening on a given port.


Field Summary
private static boolean DEBUG
           
private  NIOSelectSource listen_nio_selsource
           
(package private)  java.nio.channels.ServerSocketChannel nio_servsock
           
private  java.nio.channels.SelectionKey selkey
           
 
Fields inherited from class seda.sandStorm.lib.aSocket.ListenSockState
compQ, num_connections, port, servsock, writeClogThreshold
 
Constructor Summary
protected ListenSockState(ATcpListenRequest req)
           
  ListenSockState(ATcpListenRequest req, SelectSourceIF listen_nio_selsource)
           
 
Method Summary
protected  java.net.Socket accept()
           
protected  void close()
           
protected  void complete(ATcpConnection conn)
           
 int getLocalPort()
           
 java.lang.Object getSocket()
           
protected  void resume()
           
protected  void suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

nio_servsock

java.nio.channels.ServerSocketChannel nio_servsock

selkey

private java.nio.channels.SelectionKey selkey

listen_nio_selsource

private NIOSelectSource listen_nio_selsource
Constructor Detail

ListenSockState

public ListenSockState(ATcpListenRequest req,
                       SelectSourceIF listen_nio_selsource)
                throws java.io.IOException
Throws:
java.io.IOException

ListenSockState

protected ListenSockState(ATcpListenRequest req)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

accept

protected java.net.Socket accept()
                          throws java.io.IOException
Specified by:
accept in class ListenSockState
Throws:
java.io.IOException

suspend

protected void suspend()
Specified by:
suspend in class ListenSockState

resume

protected void resume()
Specified by:
resume in class ListenSockState

close

protected void close()
Specified by:
close in class ListenSockState

complete

protected void complete(ATcpConnection conn)
Specified by:
complete in class ListenSockState

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in class ListenSockState

getSocket

public java.lang.Object getSocket()