private void process(RequestMessage request) { if (unique.equals(request.getIdentifier().unique)) return; for (ReplyProtocol replyProtocol : replyProtocols) { try { ResponseMessage response = tryApplyProtocol(replyProtocol, request); if (response != null) { response.setIdentifier(request.getIdentifier()); forwardSingle(request.getResponseListenerAddress(), response, DispatchType.PLAIN); } return; } catch (ClassCastException ignored) { } } logger.trace( String.format("Message of type %s has been ignored", request.getClass().getSimpleName())); }
private void process(ResponseMessage message) { responsesWaiters.get(message.getIdentifier()).accept(message); }