protected void sendSync(MessageExchange me) throws MessagingException { if (!channel.sendSync(me)) { throw new MessagingException("SendSync failed"); } }
public static boolean hasInMessage(MessageExchange mex) { if (mex instanceof InOnly) { return ((InOnly) mex).getInMessage() != null; } else if (mex instanceof InOut) { return ((InOut) mex).getInMessage() != null; } return false; }
/** * Check if the <code>DeliveryChannel</code> is opened * * @throws MessagingException */ public void checkDeliveryChannelIsOpened() throws MessagingException { if (!this.opened) { throw new MessagingException("DeliveryChannel is closed"); } }
protected boolean onProviderExchangeDone(MessageExchange exchange) { return (exchange instanceof InOnly) || (exchange instanceof RobustInOnly && exchange.getFault() == null) || (exchange instanceof InOptionalOut && exchange.getFault() == null && exchange.getMessage("out") == null); }
@Override protected void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws Exception { Fault fault = exchange.createFault(); this.startValidation(exchange, in, out, fault); if (fault.getContent() != null) { exchange.setFault(fault); } }
public InOnly createInOnlyExchange() throws MessagingException { InOnly exchange = getExchangeFactory().createInOnlyExchange(); NormalizedMessage in = exchange.createMessage(); exchange.setInMessage(in); return exchange; }
public Object evaluate(MessageExchange messageExchange, NormalizedMessage normalizedMessage) throws MessagingException { return normalizedMessage.getContent(); } });
/** * Copies the subject from a message to another message * * @param from the message with the subject * @param to the message to which the subject is added * @throws MessagingException if an attachment could not be added */ public static void copySecuritySubject(NormalizedMessage from, NormalizedMessage to) throws MessagingException { to.setSecuritySubject(from.getSecuritySubject()); }
public RobustInOnly createRobustInOnlyExchange() throws MessagingException { RobustInOnly exchange = getExchangeFactory().createRobustInOnlyExchange(); NormalizedMessage in = exchange.createMessage(); exchange.setInMessage(in); return exchange; }
public InOptionalOut createInOptionalOutExchange() throws MessagingException { InOptionalOut exchange = getExchangeFactory().createInOptionalOutExchange(); NormalizedMessage in = exchange.createMessage(); exchange.setInMessage(in); return exchange; }
/** * Convert a Role to a string representation * * @param role * @return "consumer" or "provider */ protected static String roleToRaw(Role role) { return (Role.CONSUMER.equals(role)) ? "consumer" : "provider"; }
public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }
/** * 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); }
/** * Convert a Role to a string representation * * @param role * @return "consumer" or "provider */ protected static String roleToRaw(Role role) { return (Role.CONSUMER.equals(role)) ? "consumer" : "provider"; }
public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }
/** * 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); }
public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }