public void onCompletion(FutureResponse future) { try { Response response = future.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; serviceLocalException(er.getException()); } else { dequeueCounter.incrementAndGet(); localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1)); } } catch (IOException e) { serviceLocalException(e); } } };
try { response = resp.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; exception = er.getException();
? this.transport.request(command, timeout) : this.transport.request(command)); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; if (er.getException() instanceof JMSException) {
@Override public void onCompletion(FutureResponse future) { try { Response response = future.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse) response; serviceLocalException(md, er.getException()); } else { localBroker.oneway(new MessageAck(md, MessageAck.INDIVIDUAL_ACK_TYPE, 1)); networkBridgeStatistics.getDequeues().increment(); } } catch (IOException e) { serviceLocalException(md, e); } finally { sub.decrementOutstandingResponses(); } } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); LOG.debug("Error during temp destination removeal: {}", exception.getMessage()); } } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); LOG.debug("Error during temp destination removeal: {}", exception.getMessage()); } } });
protected void sendSyncToSlave(Command command) { try { Response response = (Response)slave.request(command); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; LOG.error("Slave Failed", er.getException()); } } catch (Throwable e) { LOG.error("Slave Failed", e); } } }
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); exception.printStackTrace(); getEndpoint().close(); } } else { delivery.settle(); } session.pumpProtonToSocket(); } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); exception.printStackTrace(); getEndpoint().close(); } } else { delivery.settle(); } session.pumpProtonToSocket(); } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); exception.printStackTrace(); getEndpoint().close(); } else { delivery.settle(); } session.pumpProtonToSocket(); } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { Throwable exception = ((ExceptionResponse) response).getException(); exception.printStackTrace(); getEndpoint().close(); } else { delivery.settle(); } session.pumpProtonToSocket(); } });
public void onResponse(ProtocolConverter converter, Response response) throws IOException { if (response.isException()) { // Generally a command can fail.. but that does not invalidate the connection. // We report back the failure but we don't close the connection. Throwable exception = ((ExceptionResponse)response).getException(); handleException(exception, command); } else { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); stompTransport.sendToStomp(sc); } } };
public void onCompletion(FutureResponse future) { try { Response response = future.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; serviceLocalException(er.getException()); } else { dequeueCounter.incrementAndGet(); localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1)); } } catch (IOException e) { serviceLocalException(e); } } };
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { link.setSource(null); Throwable exception = ((ExceptionResponse) response).getException(); if (exception instanceof SecurityException) { link.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage())); } else { link.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR, exception.getMessage())); } link.close(); link.free(); } } });
public void onCompletion(FutureResponse future) { try { Response response = future.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; serviceLocalException(er.getException()); } else { dequeueCounter.incrementAndGet(); localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1)); } } catch (IOException e) { serviceLocalException(e); } } };
@Override public void onResponse(MQTTProtocolConverter converter, Response response) throws IOException { if (response.isException()) { LOG.warn("Failed to send MQTT Publish: ", command, ((ExceptionResponse) response).getException()); } else { PUBACK ack = new PUBACK(); ack.messageId(command.messageId()); LOG.trace("MQTT Snd PUBACK message:{} client:{} connection:{}", command.messageId(), clientId, connectionInfo.getConnectionId()); converter.getMQTTTransport().sendToMQTT(ack.encode()); } } };
@Override public void onResponse(MQTTProtocolConverter converter, Response response) throws IOException { if (response.isException()) { LOG.warn("Failed to send MQTT Publish: ", command, ((ExceptionResponse) response).getException()); } else { PUBACK ack = new PUBACK(); ack.messageId(command.messageId()); LOG.trace("MQTT Snd PUBACK message:{} client:{} connection:{}", command.messageId(), clientId, connectionInfo.getConnectionId()); converter.getMQTTTransport().sendToMQTT(ack.encode()); } } };
protected void process(MultiplexerInput input, int realCorrelationId, Response response) throws IOException { if (response.isException()) { ExceptionResponse er = (ExceptionResponse) response; onFailure(er.getException()); } else { Response copy = new Response(); response.copy(copy); copy.setCorrelationId(realCorrelationId); input.oneway(copy); } }
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { ExceptionResponse er = (ExceptionResponse) response; Rejected rejected = new Rejected(); rejected.setError(new ErrorCondition(Symbol.valueOf("failed"), er.getException().getMessage())); delivery.disposition(rejected); } else { delivery.disposition(Accepted.getInstance()); } LOG.debug("TX: {} settling {}", operation, action); delivery.settle(); session.pumpProtonToSocket(); } });
protected void process(MultiplexerInput input, int realCorrelationId, Response response) throws IOException { if (response.isException()) { ExceptionResponse er = (ExceptionResponse) response; onFailure(er.getException()); } else { Response copy = new Response(); response.copy(copy); copy.setCorrelationId(realCorrelationId); input.oneway(copy); } }