public class InspectableProducer<T> extends JmsTemplateProducer<T>
IkasanJmsTemplate setup. If you want to use it with a
IkasanJmsTemplate simple provide the instance of the template in constructor (directly or in Spring config)
and provide "configuration" and "configuredResourceId" parameters.
Useful for Unittest by providing a Spring config that will override the original producer with this implementation,
so that you can check the persisted messages by calling the getEvents() and getEventCount() methods.| Constructor and Description |
|---|
InspectableProducer()
Constructs a InspectableProducer.
|
InspectableProducer(IkasanJmsTemplate jmsTemplate)
Constructs a InspectableProducer with an
IkasanJmsTemplate. |
| Modifier and Type | Method and Description |
|---|---|
int |
getEventCount() |
List<T> |
getEvents() |
void |
invoke(T message) |
boolean |
isUseJms() |
void |
setUseJms(boolean useJms) |
getConfiguration, getConfiguredResourceId, isCriticalOnStartup, setConfiguration, setConfiguredResourceId, setCriticalOnStartup, setManagedResourceRecoveryManager, startManagedResource, stopManagedResourcepublic InspectableProducer()
public InspectableProducer(IkasanJmsTemplate jmsTemplate)
IkasanJmsTemplate.
All messages that the producer processes will be collected and also send via the jms template.jmsTemplate - public boolean isUseJms()
public void setUseJms(boolean useJms)
useJms - configuration if the messages are processed via Jms after collectionpublic int getEventCount()
public void invoke(T message) throws EndpointException
invoke in interface Producer<T>invoke in class JmsTemplateProducer<T>EndpointExceptionCopyright © 2007-2017 Ikasan. All Rights Reserved.