com.caucho.cloud.hmtp
Class HmtpRequest
java.lang.Object
com.caucho.network.listen.AbstractProtocolConnection
com.caucho.cloud.hmtp.HmtpRequest
- All Implemented Interfaces:
- ProtocolConnection
public class HmtpRequest
- extends AbstractProtocolConnection
Handles HMTP requests from a peer server.
If the request does not match one of the HMTP codes, it the HmtpRequest
will forward to the HMUX request for compatibility.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HMUX_TO_UNIDIR_HMTP
public static final int HMUX_TO_UNIDIR_HMTP
- See Also:
- Constant Field Values
HMUX_SWITCH_TO_HMTP
public static final int HMUX_SWITCH_TO_HMTP
- See Also:
- Constant Field Values
HMUX_HMTP_OK
public static final int HMUX_HMTP_OK
- See Also:
- Constant Field Values
HmtpRequest
public HmtpRequest(SocketLink conn,
BamSystem bamService)
isWaitForRead
public boolean isWaitForRead()
- Description copied from interface:
ProtocolConnection
- Return true if the connection should wait for a read before
handling the request.
onStartConnection
public void onStartConnection()
- Description copied from interface:
ProtocolConnection
- Called when the connection starts, i.e. just after the accept
- Specified by:
onStartConnection
in interface ProtocolConnection
- Overrides:
onStartConnection
in class AbstractProtocolConnection
handleRequest
public boolean handleRequest()
throws java.io.IOException
- Description copied from class:
AbstractProtocolConnection
- Handles a new connection. The controlling TcpServer may call
handleConnection again after the connection completes, so
the implementation must initialize any variables for each connection.
- Specified by:
handleRequest
in interface ProtocolConnection
- Specified by:
handleRequest
in class AbstractProtocolConnection
- Throws:
java.io.IOException
onCloseConnection
public void onCloseConnection()
- Close when the socket closes.
- Specified by:
onCloseConnection
in interface ProtocolConnection
- Overrides:
onCloseConnection
in class AbstractProtocolConnection
getRequestId
protected java.lang.String getRequestId()
dbgId
public final java.lang.String dbgId()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object