com.caucho.server.connection
Class TcpDuplexController

java.lang.Object
  extended by com.caucho.server.connection.ConnectionController
      extended by com.caucho.server.connection.TcpDuplexController

public class TcpDuplexController
extends ConnectionController

Public API to control a http upgrade connection.


Constructor Summary
TcpDuplexController(TcpServerRequest request, TcpDuplexHandler handler)
           
 
Method Summary
 void close()
          Closes the connection.
 TcpDuplexHandler getHandler()
          Returns the handler
 long getIdleTimeMax()
          Gets the max idle time.
 ReadStream getReadStream()
          Returns the read stream.
 WriteStream getWriteStream()
          Returns the write stream.
 boolean isDuplex()
          Returns true for a duplex controller
 boolean serviceRead()
           
 void setIdleTimeMax(long idleTime)
          Sets the max idle time.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.server.connection.ConnectionController
getConnection, isActive, isClosed, isTimeout, timeout, wake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpDuplexController

public TcpDuplexController(TcpServerRequest request,
                           TcpDuplexHandler handler)
Method Detail

isDuplex

public boolean isDuplex()
Returns true for a duplex controller

Overrides:
isDuplex in class ConnectionController

setIdleTimeMax

public void setIdleTimeMax(long idleTime)
Sets the max idle time.


getIdleTimeMax

public long getIdleTimeMax()
Gets the max idle time.


getReadStream

public ReadStream getReadStream()
Returns the read stream. The read stream should only be used by the read handler.


getWriteStream

public WriteStream getWriteStream()
Returns the write stream. The write stream must be synchronized if multiple threads can write to it.


getHandler

public TcpDuplexHandler getHandler()
Returns the handler


close

public void close()
Closes the connection.

Overrides:
close in class ConnectionController

serviceRead

public boolean serviceRead()

toString

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