com.caucho.vfs
Class QServerSocketWrapper

java.lang.Object
  extended by com.caucho.vfs.QServerSocket
      extended by com.caucho.vfs.QServerSocketWrapper

public class QServerSocketWrapper
extends QServerSocket

Abstract socket to handle both normal sockets and bin/resin sockets.


Constructor Summary
QServerSocketWrapper()
           
QServerSocketWrapper(java.net.ServerSocket ss)
           
 
Method Summary
 boolean accept(QSocket qSocket)
          Accepts a new socket.
 void close()
          Closes the underlying socket.
 QSocket createSocket()
          Creates a new socket object.
 java.net.InetAddress getLocalAddress()
           
 int getLocalPort()
           
 java.nio.channels.Selector getSelector()
           
 void init(java.net.ServerSocket ss)
           
 boolean isTcpKeepalive()
           
 boolean isTcpNoDelay()
           
 void setConnectionSocketTimeout(int socketTimeout)
          Sets the connection read timeout.
 void setTcpKeepalive(boolean isEnable)
           
 void setTcpNoDelay(boolean delay)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.vfs.QServerSocket
getSystemFD, isClosed, isJni, listen, setSaveOnExec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QServerSocketWrapper

public QServerSocketWrapper()

QServerSocketWrapper

public QServerSocketWrapper(java.net.ServerSocket ss)
Method Detail

init

public void init(java.net.ServerSocket ss)

setTcpNoDelay

public void setTcpNoDelay(boolean delay)
Overrides:
setTcpNoDelay in class QServerSocket

isTcpNoDelay

public boolean isTcpNoDelay()
Overrides:
isTcpNoDelay in class QServerSocket

setTcpKeepalive

public void setTcpKeepalive(boolean isEnable)
Overrides:
setTcpKeepalive in class QServerSocket

isTcpKeepalive

public boolean isTcpKeepalive()
Overrides:
isTcpKeepalive in class QServerSocket

setConnectionSocketTimeout

public void setConnectionSocketTimeout(int socketTimeout)
Description copied from class: QServerSocket
Sets the connection read timeout.

Specified by:
setConnectionSocketTimeout in class QServerSocket

accept

public boolean accept(QSocket qSocket)
               throws java.io.IOException
Accepts a new socket.

Specified by:
accept in class QServerSocket
Throws:
java.io.IOException

createSocket

public QSocket createSocket()
                     throws java.io.IOException
Creates a new socket object.

Specified by:
createSocket in class QServerSocket
Throws:
java.io.IOException

getLocalAddress

public java.net.InetAddress getLocalAddress()
Specified by:
getLocalAddress in class QServerSocket

getLocalPort

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

getSelector

public java.nio.channels.Selector getSelector()
Overrides:
getSelector in class QServerSocket

close

public void close()
           throws java.io.IOException
Closes the underlying socket.

Specified by:
close in class QServerSocket
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object