public interface RequestResponseChannel
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(Request request)
Closes the connection on which the original request came
|
Request |
receiveRequest()
Receives the request from the channel
|
void |
sendRequest(Request request)
Sends a request over the network.
|
void |
sendResponse(Send payloadToSend,
Request originalRequest,
ServerNetworkResponseMetrics metrics)
Queue's the response into the channel for the network server to pick up
|
void |
shutdown()
Shuts down the request response channel
|
void sendResponse(Send payloadToSend, Request originalRequest, ServerNetworkResponseMetrics metrics) throws java.lang.InterruptedException
payloadToSend
- The payload to be sent over the networkoriginalRequest
- The original request this response belongs tometrics
- The set of metrics tracked at the network layerjava.lang.InterruptedException
Request receiveRequest() throws java.lang.InterruptedException
java.lang.InterruptedException
void sendRequest(Request request) throws java.lang.InterruptedException
request
- The request to be queued by the channeljava.lang.InterruptedException
void closeConnection(Request request) throws java.lang.InterruptedException
request
- The request whose connection needs to be closedjava.lang.InterruptedException
void shutdown()