public void handleAsyncResponse(Packet packet) { if (responseAsyncCache != null && packet.isResponseAsync()) { responseAsyncCache.handleResponse(packet); } }
public void handleAsyncResponse(Packet packet) { if (responseAsyncCache != null && packet.isResponseAsync()) { responseAsyncCache.handleResponse(packet); } }
public void handleAsyncResponse(Packet packet) { if (responseAsyncCache != null && packet.isResponseAsync()) { responseAsyncCache.handleResponse(packet); } }
private static Packet convertToExceptionPacket(Packet packet, ActiveMQException e) { Packet response; if (packet.isResponseAsync()) { response = new ActiveMQExceptionMessage_V2(packet.getCorrelationID(), e); } else { response = new ActiveMQExceptionMessage(e); } return response; }
private Packet createSessionXAResponseMessage(Packet packet) { Packet response; if (packet.isResponseAsync()) { response = new SessionXAResponseMessage_V2(packet.getCorrelationID(), false, XAResource.XA_OK, null); } else { response = new SessionXAResponseMessage(false, XAResource.XA_OK, null); } return response; }
private static Packet onActiveMQXAExceptionWhileHandlePacket(Packet packet, ActiveMQXAException e, boolean requiresResponse, Packet response) { if (requiresResponse) { logger.debug("Sending exception to client", e); if (packet.isResponseAsync()) { response = new SessionXAResponseMessage_V2(packet.getCorrelationID(), true, e.errorCode, e.getMessage()); } else { response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage()); } } else { ActiveMQServerLogger.LOGGER.caughtXaException(e); } return response; }
private Packet createNullResponseMessage(Packet packet) { final Packet response; if (!packet.isResponseAsync() || channel.getConnection().isVersionBeforeAsyncResponseChange()) { response = new NullResponseMessage(); } else { response = new NullResponseMessage_V2(packet.getCorrelationID()); } return response; }
packet.setChannelID(id); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { packet.setCorrelationID(responseAsyncCache.nextCorrelationID()); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { while (!responseAsyncCache.add(packet)) { try { if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { responseAsyncCache.remove(packet.getCorrelationID());
if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket && !response.isResponseAsync()) { ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace"));
packet.setChannelID(id); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { packet.setCorrelationID(responseAsyncCache.nextCorrelationID()); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { while (!responseAsyncCache.add(packet)) { try { if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { responseAsyncCache.remove(packet.getCorrelationID());
packet.setChannelID(id); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { packet.setCorrelationID(responseAsyncCache.nextCorrelationID()); if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { while (!responseAsyncCache.add(packet)) { try { if (responseAsyncCache != null && packet.isRequiresResponse() && packet.isResponseAsync()) { responseAsyncCache.remove(packet.getCorrelationID());
if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket && !response.isResponseAsync()) { ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace"));
if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket && !response.isResponseAsync()) { ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace"));