com.caucho.cloud.bam
Class HmtpStream

java.lang.Object
  extended by com.caucho.cloud.bam.HmtpStream

public class HmtpStream
extends java.lang.Object

Hmtp connection


Constructor Summary
HmtpStream(ClientSocketFactory socketPool, ClientSocket stream, Broker broker, SecurityService security)
           
 
Method Summary
 void clearIdleStartTime()
          Clears the idle start time on a reset.
 void close()
           
 HmtpWebSocketReader getHmtpReader()
           
 HmtpWebSocketWriter getHmtpWriter()
           
 long getIdleStartTime()
          Returns the idle start time, i.e.
 boolean isIdleExpired()
          Returns true if end of free time.
 void setIdleStartTime(long idleStartTime)
          Sets the idle start time.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HmtpStream

public HmtpStream(ClientSocketFactory socketPool,
                  ClientSocket stream,
                  Broker broker,
                  SecurityService security)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getHmtpReader

public HmtpWebSocketReader getHmtpReader()

getHmtpWriter

public HmtpWebSocketWriter getHmtpWriter()

getIdleStartTime

public long getIdleStartTime()
Returns the idle start time, i.e. the time the connection was last idle.


setIdleStartTime

public void setIdleStartTime(long idleStartTime)
Sets the idle start time. Because of clock skew and tcp delays, it's often better to use the request start time instead of the request end time for the idle start time.


clearIdleStartTime

public void clearIdleStartTime()
Clears the idle start time on a reset.


isIdleExpired

public boolean isIdleExpired()
Returns true if end of free time.


close

public void close()

toString

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