public interface RequestResponseChannel
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(NetworkRequest request)
Closes the connection on which the original request came
|
NetworkRequest |
receiveRequest()
Receives the request from the channel
|
void |
sendRequest(NetworkRequest request)
Sends a request over the network.
|
void |
sendResponse(Send payloadToSend,
NetworkRequest 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, NetworkRequest 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
NetworkRequest receiveRequest() throws java.lang.InterruptedException
java.lang.InterruptedException
void sendRequest(NetworkRequest request) throws java.lang.InterruptedException
request
- The request to be queued by the channeljava.lang.InterruptedException
void closeConnection(NetworkRequest request) throws java.lang.InterruptedException
request
- The request whose connection needs to be closedjava.lang.InterruptedException
void shutdown()