public class GenericJmsProducer<T> extends Object implements Producer<T>, ManagedIdentifierService<ManagedEventIdentifierService>, ManagedResource, ConfiguredResource<GenericJmsProducerConfiguration>
| Modifier and Type | Class and Description |
|---|---|
protected class |
GenericJmsProducer.ByteArrayToMessage
Specific converter implementation for converting byte[] to Message
|
protected class |
GenericJmsProducer.MapToMessage
Specific converter implementation for converting any Map to Message
|
protected class |
GenericJmsProducer.SerializableToMessage
Specific converter implementation for converting any serializable object to Message
|
protected class |
GenericJmsProducer.StringToMessage
Specific converter implementation for converting String to JMS Text Message
|
| Modifier and Type | Field and Description |
|---|---|
protected Converter<byte[],javax.jms.Message> |
byteArrayToMessageConverter |
protected GenericJmsProducerConfiguration |
configuration
JMS consumer configuration - default to vanilla instance
|
protected String |
configuredResourceId
configured resource id
|
protected javax.jms.Connection |
connection
JMS Connection
|
protected javax.jms.ConnectionFactory |
connectionFactory
JMS Connection Factory
|
protected javax.jms.Destination |
destination
JMS Destination instance
|
protected DestinationResolver |
destinationResolver
destination resolver for locating and returning the configured destination instance
|
protected boolean |
isCriticalOnStartup
determines whether this managed resource failure will fail the startup of the flow
|
protected ManagedEventIdentifierService<String,javax.jms.Message> |
managedEventIdentifierService
default event identifier service - can be overridden via the setter
|
protected Converter<Map<String,Object>,javax.jms.Message> |
mapToMessageConverter |
protected PostProcessor |
postProcessor
post processing operations on the JMS message before being sent over the wire
|
protected Converter<Serializable,javax.jms.Message> |
serializableToMessageConverter |
protected javax.jms.Session |
session
session has to be closed prior to connection being closed
|
protected Converter<String,javax.jms.TextMessage> |
stringToMessageConverter
Incoming object to JMS message converters.
|
| Constructor and Description |
|---|
GenericJmsProducer()
Constructor.
|
GenericJmsProducer(javax.jms.ConnectionFactory connectionFactory,
javax.jms.Destination destination)
Constructor.
|
GenericJmsProducer(javax.jms.ConnectionFactory connectionFactory,
DestinationResolver destinationResolver)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.jms.Message |
convertToMessage(Object object) |
GenericJmsProducerConfiguration |
getConfiguration() |
String |
getConfiguredResourceId() |
protected Object |
getPayload(Object message)
Extract the payload based on event coming in.
|
void |
invoke(T message) |
boolean |
isCriticalOnStartup() |
void |
setConfiguration(GenericJmsProducerConfiguration configuration) |
void |
setConfiguredResourceId(String configuredResourceId) |
void |
setCriticalOnStartup(boolean isCriticalOnStartup) |
void |
setManagedIdentifierService(ManagedEventIdentifierService managedEventIdentifierService)
Override the default producer event life identifier service
|
void |
setManagedResourceRecoveryManager(ManagedResourceRecoveryManager managedResourceRecoveryManager) |
void |
setPostProcessor(PostProcessor postProcessor)
Allow the setting of a custom message property provider.
|
void |
startManagedResource() |
void |
stopManagedResource() |
protected javax.jms.ConnectionFactory connectionFactory
protected javax.jms.Destination destination
protected javax.jms.Connection connection
protected String configuredResourceId
protected GenericJmsProducerConfiguration configuration
protected ManagedEventIdentifierService<String,javax.jms.Message> managedEventIdentifierService
protected javax.jms.Session session
protected boolean isCriticalOnStartup
protected DestinationResolver destinationResolver
protected PostProcessor postProcessor
protected Converter<String,javax.jms.TextMessage> stringToMessageConverter
protected Converter<Map<String,Object>,javax.jms.Message> mapToMessageConverter
protected Converter<byte[],javax.jms.Message> byteArrayToMessageConverter
protected Converter<Serializable,javax.jms.Message> serializableToMessageConverter
public GenericJmsProducer()
public GenericJmsProducer(javax.jms.ConnectionFactory connectionFactory,
javax.jms.Destination destination)
connectionFactory - destination - public GenericJmsProducer(javax.jms.ConnectionFactory connectionFactory,
DestinationResolver destinationResolver)
connectionFactory - destinationResolver - protected javax.jms.Message convertToMessage(Object object)
public void invoke(T message) throws EndpointException
invoke in interface Producer<T>EndpointExceptionpublic void setPostProcessor(PostProcessor postProcessor)
postProcessor - public void setManagedIdentifierService(ManagedEventIdentifierService managedEventIdentifierService)
setManagedIdentifierService in interface ManagedIdentifierService<ManagedEventIdentifierService>managedEventIdentifierService - public GenericJmsProducerConfiguration getConfiguration()
getConfiguration in interface Configured<GenericJmsProducerConfiguration>public String getConfiguredResourceId()
getConfiguredResourceId in interface ConfiguredResource<GenericJmsProducerConfiguration>public void setConfiguration(GenericJmsProducerConfiguration configuration)
setConfiguration in interface Configured<GenericJmsProducerConfiguration>public void setConfiguredResourceId(String configuredResourceId)
setConfiguredResourceId in interface ConfiguredResource<GenericJmsProducerConfiguration>public void startManagedResource()
startManagedResource in interface ManagedResourcepublic void stopManagedResource()
stopManagedResource in interface ManagedResourcepublic boolean isCriticalOnStartup()
isCriticalOnStartup in interface ManagedResourcepublic void setCriticalOnStartup(boolean isCriticalOnStartup)
setCriticalOnStartup in interface ManagedResourcepublic void setManagedResourceRecoveryManager(ManagedResourceRecoveryManager managedResourceRecoveryManager)
setManagedResourceRecoveryManager in interface ManagedResourceCopyright © 2007-2016 Ikasan. All Rights Reserved.