use of edu.umass.cs.gnsserver.gnsapp.packet.BasicPacketWithClientAddress in project GNS by MobilityFirst.
the class GNSApp method sendToClient.
/**
* Delegates client messaging to gigapaxos.
*
* @param responseJSON
* @throws java.io.IOException
*/
@Override
public void sendToClient(Request response, JSONObject responseJSON) throws IOException {
if (DELEGATE_CLIENT_MESSAGING) {
assert (response instanceof ClientRequest);
Request originalRequest = this.outstanding.remove(((RequestIdentifier) response).getRequestID());
assert (originalRequest != null && originalRequest instanceof BasicPacketWithClientAddress) : ((ClientRequest) response).getSummary();
if (originalRequest != null && originalRequest instanceof BasicPacketWithClientAddress) {
((BasicPacketWithClientAddress) originalRequest).setResponse((ClientRequest) response);
incrResponseCount((ClientRequest) response);
}
GNSConfig.getLogger().log(Level.FINE, "{0} set response {1} for requesting client {2} for request {3}", new Object[] { this, response, ((BasicPacketWithClientAddress) originalRequest).getClientAddress(), originalRequest.getSummary() });
return;
}
// else
}
Aggregations