public interface IClientConnection
Modifier and Type | Method and Description |
---|---|
void |
allowTunnel(IHTTPRequestMessage req,
org.eclipse.actf.util.internal.httpproxy.core.ServerConnection sc,
long timeout)
Allow to establish tunnel for connect request
|
String |
close()
Close the connection.
|
Socket |
getClientSocket()
Get a socket object for connecting with the client.
|
int |
getCurrentServerGroupIndex()
Gets index of the current server group.
|
boolean |
isHandlingRequest()
Returns whether this connection is handling a request but a response is not sent yet.
|
void |
rejectTunnel(IHTTPRequestMessage req,
long timeout)
Reject to establish tunnel for connect request
|
void |
resetConnection()
Reset the connection.
|
void |
run()
Continuously read requests from the client and put them into the send
queue of the dispatcher.
|
void |
sendResponse(IHTTPResponseMessage response)
Send a HTTP response message to the client.
|
void |
sendResponse(long timeout,
IHTTPResponseMessage response)
Send a HTTP response message to the client.
|
void |
sendResponse(long timeout,
IHTTPResponseMessage response,
boolean readyToHandleRequest)
Send a HTTP response message to the client.
|
void resetConnection()
String close()
Socket getClientSocket()
int getCurrentServerGroupIndex()
boolean isHandlingRequest()
void sendResponse(long timeout, IHTTPResponseMessage response, boolean readyToHandleRequest) throws InterruptedException, IOException, TimeoutException
timeout
- Number of milliseconds to wait until the response is sent to the client, or 0 if it does not need to timeoutresponse
- a HTTP response messagereadyToHandleRequest
- true if "handlingRequest" status needs to be set to false after the response is sent successfullyInterruptedException
IOException
TimeoutException
- if it failed to send the response within the specified timeisHandlingRequest()
void sendResponse(long timeout, IHTTPResponseMessage response) throws InterruptedException, IOException, TimeoutException
timeout
- Number of milliseconds to wait until the response is sent to the client, or 0 if it does not need to timeoutresponse
- a HTTP response messageInterruptedException
IOException
TimeoutException
- if it failed to send the response within the specified timeisHandlingRequest()
void sendResponse(IHTTPResponseMessage response) throws InterruptedException, IOException
response
- a HTTP response messageInterruptedException
IOException
isHandlingRequest()
void allowTunnel(IHTTPRequestMessage req, org.eclipse.actf.util.internal.httpproxy.core.ServerConnection sc, long timeout) throws InterruptedException, TimeoutException, IOException
req
- sc
- timeout
- InterruptedException
TimeoutException
IOException
void rejectTunnel(IHTTPRequestMessage req, long timeout) throws InterruptedException, TimeoutException, IOException
req
- timeout
- InterruptedException
TimeoutException
IOException
void run()