@Override public String toString() { if (isTemporary()) { return "{" + type.name() + "}$TEMPORARY$"; } else { return "{" + type.name() + "}" + name; } }
MessageProcessor processor = new MessageProcessor() { @Override public void run() { **new MessageProcessor()**.generate(outgoingQueue); } };
/** * Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ protected Message createMessage(ConnectionContext context, BasicMessage basicMessage) throws JMSException { return createMessage(context, basicMessage, null); }
/** * If the given {@code message.getBinaryData()} is not {@code null} delegates to * {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} otherwise delegates to * {@link #send(ProducerConnectionContext, BasicMessageWithExtraData, Map)} * * @param context information that determines where the message is sent * @param message the message to send * @param headers headers for the JMS transport that will override same-named headers in the basic message * @return the message ID * @throws JMSException any error */ public <T extends BasicMessage> MessageId send(ProducerConnectionContext context, BasicMessageWithExtraData<T> message, Map<String, String> headers) throws JMSException { if (message.getBinaryData() == null) { return send(context, message.getBasicMessage(), headers); } else { return sendWithBinaryData(context, message.getBasicMessage(), message.getBinaryData(), headers); } }
/** * Creates a new consumer connection context, reusing any existing connection that might have already been created. * The destination of the connection's session will be that of the given endpoint. * * @param endpoint where the consumer will listen for messages * @return the new consumer connection context fully populated * @throws JMSException any error */ public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint) throws JMSException { return createConsumerConnectionContext(endpoint, null); }
/** * Same as {@link #send(ProducerConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ public MessageId send(ProducerConnectionContext context, BasicMessage basicMessage) throws JMSException { return send(context, basicMessage, null); }
/** * Same as {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} with * <code>null</code> headers. */ public MessageId sendWithBinaryData(ProducerConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return sendWithBinaryData(context, basicMessage, inputStream, null); }
/** * Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return createMessageWithBinaryData(context, basicMessage, inputStream, null); }
/** * Same as {@link #sendAndListen(ProducerConnectionContext, BasicMessage, BasicMessageListener, Map)} with * <code>null</code> headers. */ public <T extends BasicMessage> RPCConnectionContext sendAndListen(ProducerConnectionContext context, BasicMessage basicMessage, BasicMessageListener<T> responseListener) throws JMSException { return sendAndListen(context, basicMessage, responseListener, null); }
MessageProcessor processor = new MessageProcessor() { // the run method which should fetch the message processor class. final public void run() { MessageProcessor(outgoingQueue).generate(outgoingQueue); } };
@Override public String toString() { if (isTemporary()) { return "{" + type.name() + "}$TEMPORARY$"; } else { return "{" + type.name() + "}" + name; } }
/** * Creates a new consumer connection context, reusing any existing connection that might have already been created. * The destination of the connection's session will be that of the given endpoint. * * @param endpoint where the consumer will listen for messages * @return the new consumer connection context fully populated * @throws JMSException any error */ public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint) throws JMSException { return createConsumerConnectionContext(endpoint, null); }
/** * Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ protected Message createMessage(ConnectionContext context, BasicMessage basicMessage) throws JMSException { return createMessage(context, basicMessage, null); }
/** * Same as {@link #send(ProducerConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ public MessageId send(ProducerConnectionContext context, BasicMessage basicMessage) throws JMSException { return send(context, basicMessage, null); }
/** * Same as {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} with * <code>null</code> headers. */ public MessageId sendWithBinaryData(ProducerConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return sendWithBinaryData(context, basicMessage, inputStream, null); }
/** * Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers. */ protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return createMessageWithBinaryData(context, basicMessage, inputStream, null); }
/** * Same as {@link #sendAndListen(ProducerConnectionContext, BasicMessage, BasicMessageListener, Map)} with * <code>null</code> headers. */ public <T extends BasicMessage> RPCConnectionContext sendAndListen(ProducerConnectionContext context, BasicMessage basicMessage, BasicMessageListener<T> responseListener) throws JMSException { return sendAndListen(context, basicMessage, responseListener, null); }
from("file:fileLocation?idempotent=true&preMove=working") .process(new MessageProcessor()) .choice() .when(header("processPassed").isEqualTo(true)) .to("file:newLocation") .otherwise() .to("file:fileLocation");
public class ConnectionManager { public void connect() { MessageProcessor pm = new MessageProcessor(this); } public void setConnected(boolean connected) { this.connected = connected; } }
MessageProcessor processor = new MessageProcessor() { @Override final public void run() { MessageProcessor(outgoingQueue).generate(outgoingQueue); } };