protected void send(MessageExchange me) throws MessagingException { channel.send(me); }
public void send(MessageExchange exchange) throws MessagingException { getDeliveryChannel().send(exchange); }
public void run() { try { logger.debug("Handling jms message {}", message); Context context = createContext(); MessageExchange exchange = toNMS(message, context); // TODO: copy protocol messages //inMessage.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(message)); pendingMessages.put(exchange.getExchangeId(), context); channel.send(exchange); } catch (Throwable e) { logger.error("Error while handling jms message", e); } } });
public void afterCompletion(boolean success) { if (success) { //Deliver reply to external world only if ODE scheduler's job has completed successfully try { _ode.getChannel().send(jbiMex); __log.debug("Consuming MEX tracker mexId: " + mexId + " clientId: " + clientId); _jbiMexTracker.consume(clientId); } catch (MessagingException e) { __log.error("Error delivering response from ODE to JBI mexId: " + mexId + " clientId: " + clientId, e); } } }
public void run() { try { _outstandingExchanges.put(inonly.getExchangeId(), odeMex); _ode.getChannel().send(inonly); } catch (MessagingException e) { String errmsg = "Error sending request-only message to JBI for ODE mex " + odeMex; __log.error(errmsg, e); } } });
public void run() { try { _outstandingExchanges.put(inout.getExchangeId(), odeMex); _mexTimeouts.put(inout.getExchangeId(), System.currentTimeMillis()+_responseTimeout); _ode.getChannel().send(inout); } catch (MessagingException e) { String errmsg = "Error sending request-only message to JBI for ODE mex " + odeMex; __log.error(errmsg, e); } } });
/** * A helper method to indicate that the message exchange is complete * which will set the status to {@link ExchangeStatus#DONE} and send the message * on the delivery channel. * * @param exchange * @throws MessagingException */ public void done(MessageExchange exchange) throws MessagingException { exchange.setStatus(ExchangeStatus.DONE); getDeliveryChannel().send(exchange); }
/** * A helper method to indicate that the message exchange is complete * which will set the status to {@link ExchangeStatus#DONE} and send the message * on the delivery channel. * * @param exchange * @throws MessagingException */ public void done(MessageExchange exchange) throws MessagingException { exchange.setStatus(ExchangeStatus.DONE); getDeliveryChannel().send(exchange); }
/** * A helper method to indicate that the message exchange is complete * which will set the status to {@link ExchangeStatus#DONE} and send the message * on the delivery channel. * * @param exchange * @throws MessagingException */ public void done(MessageExchange exchange) throws MessagingException { exchange.setStatus(ExchangeStatus.DONE); getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { exchange.setFault(fault); getDeliveryChannel().send(exchange); }
/** * A helper method to indicate that the message exchange should be * continued with the given response and send the message * on the delivery channel. * * @param exchange * @throws MessagingException */ public void answer(MessageExchange exchange, NormalizedMessage answer) throws MessagingException { exchange.setMessage(answer, "out"); getDeliveryChannel().send(exchange); }
/** * A helper method to indicate that the message exchange should be * continued with the given response and send the message * on the delivery channel. * * @param exchange * @throws MessagingException */ public void answer(MessageExchange exchange, NormalizedMessage answer) throws MessagingException { exchange.setMessage(answer, "out"); getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { if (exchange instanceof InOnly || fault == null) { exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault)); } else { exchange.setFault(fault); } getDeliveryChannel().send(exchange); }
public void send(MessageExchange exchange) throws MessagingException { prepareExchange(exchange); handleExchange(exchange, exchange.getStatus() == ExchangeStatus.ACTIVE); try { channel.send(exchange); } catch (MessagingException e) { handleExchange(exchange, false); throw e; } }
/** * A helper method which fails and completes the given exchange with the specified error * @throws MessagingException */ public void fail(MessageExchange exchange, Exception error) throws MessagingException { if (exchange instanceof InOnly || !(error instanceof FaultException)) { exchange.setError(error); } else { FaultException faultException = (FaultException) error; exchange.setFault(faultException.getFault()); } getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified error */ public void fail(MessageExchange exchange, Exception error) throws MessagingException { if (error instanceof FaultException) { FaultException faultException = (FaultException) error; exchange.setFault(faultException.getFault()); } else { exchange.setError(error); } getDeliveryChannel().send(exchange); }
public void onMessageExchange(MessageExchange exchange) throws MessagingException { NormalizedMessage inMessage = exchange.getMessage("in"); messageList.addMessage(inMessage); exchange.setStatus(ExchangeStatus.DONE); context.getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { if (exchange instanceof InOnly || fault == null) { exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault)); } else { exchange.setFault(fault); } getDeliveryChannel().send(exchange); }
protected void forwardToExchange(MessageExchange exchange, InOnly outExchange, NormalizedMessage in) throws MessagingException { NormalizedMessage out = outExchange.createMessage(); outExchange.setInMessage(out); getMessageTransformer().transform(exchange, in, out); getDeliveryChannel().send(outExchange); }
protected void forwardToExchange(MessageExchange exchange, InOnly outExchange, NormalizedMessage in) throws MessagingException { NormalizedMessage out = outExchange.createMessage(); outExchange.setInMessage(out); getMessageTransformer().transform(exchange, in, out); getDeliveryChannel().send(outExchange); } }