public class CamelMessageProducer extends Object implements org.gytheio.messaging.MessageProducer
| Modifier and Type | Field and Description |
|---|---|
protected String |
endpoint |
protected static String |
ERROR_SENDING |
protected static String |
HEADER_JMS_AMQP_MESSAGE_FORMAT |
protected static Long |
HEADER_JMS_AMQP_MESSAGE_FORMAT_VALUE |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected org.apache.camel.ProducerTemplate |
producer |
| Constructor and Description |
|---|
CamelMessageProducer() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
addHeaders(Map<String,Object> origHeaders) |
void |
send(Object message) |
void |
send(Object message,
Map<String,Object> headers) |
void |
send(Object message,
String queueName) |
void |
send(Object message,
String queueName,
Map<String,Object> headers) |
void |
setEndpoint(String endpoint)
The Camel endpoint for initial delivery of the messages into the Camel context which
can then be routed as needed
|
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Optional object mapper to be used programatically in
send(Object, String)
or send(Object, String, Map) methods when an alternate endpoint is specified. |
void |
setProducer(org.apache.camel.ProducerTemplate producer)
The Camel producer template
|
protected void |
validateEndpoint(String endpoint)
Checks that the given endpoint is valid
|
protected static final String HEADER_JMS_AMQP_MESSAGE_FORMAT
protected static final Long HEADER_JMS_AMQP_MESSAGE_FORMAT_VALUE
protected static final String ERROR_SENDING
protected org.apache.camel.ProducerTemplate producer
protected String endpoint
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
public void setProducer(org.apache.camel.ProducerTemplate producer)
producer - public void setEndpoint(String endpoint)
endpoint - public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
send(Object, String)
or send(Object, String, Map) methods when an alternate endpoint is specified.objectMapper - protected void validateEndpoint(String endpoint)
endpoint - public void send(Object message)
send in interface org.gytheio.messaging.MessageProducerpublic void send(Object message, Map<String,Object> headers)
send in interface org.gytheio.messaging.MessageProducerpublic void send(Object message, String queueName)
send in interface org.gytheio.messaging.MessageProducerCopyright © 2017 Alfresco Software. All rights reserved.