Class SolaceJcsmpAbstractConsumer
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageWorkerImp
-
- com.adaptris.core.AdaptrisMessageConsumerImp
-
- com.adaptris.core.jcsmp.solace.SolaceJcsmpAbstractConsumer
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageConsumer
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,SolaceJcsmpReceiverStarter
,MessageEventGenerator
,StateManagedComponent
,com.solacesystems.jcsmp.XMLMessageListener
- Direct Known Subclasses:
SolaceJcsmpQueueConsumer
,SolaceJcsmpTopicConsumer
public abstract class SolaceJcsmpAbstractConsumer extends AdaptrisMessageConsumerImp implements SolaceJcsmpReceiverStarter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SolaceJcsmpAbstractConsumer.accessType
static class
SolaceJcsmpAbstractConsumer.ackMode
static class
SolaceJcsmpAbstractConsumer.permissions
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description SolaceJcsmpAbstractConsumer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected com.solacesystems.jcsmp.ConsumerFlowProperties
createConsumerFlowProperties(com.solacesystems.jcsmp.Queue queue)
protected com.solacesystems.jcsmp.EndpointProperties
createEndpointProperties()
java.lang.String
getAcknowledgeMode()
"CLIENT" / "AUTO"java.lang.String
getEndpointAccessType()
"EXCLUSIVE" / "NONEXCLUSIVE"java.lang.String
getEndpointPermissions()
"CONSUME" / "DELETE" / "READ_ONLY" / "NONE" / "MODIFY_TOPIC""SolaceJcsmpMessageTranslator
getMessageTranslator()
The message translator is responsible for translating the Solace JCSMP message object into anAdaptrisMessage
and the reverse.java.lang.Boolean
getTransacted()
If set to 'true' will commit or rollback the consumed message upon success or failure during processing.void
init()
void
onException(com.solacesystems.jcsmp.JCSMPException exception)
void
onReceive(com.solacesystems.jcsmp.BytesXMLMessage message)
void
setAcknowledgeMode(java.lang.String acknowledgeMode)
"CLIENT" / "AUTO"void
setEndpointAccessType(java.lang.String endpointAccessType)
"EXCLUSIVE" / "NONEXCLUSIVE"void
setEndpointPermissions(java.lang.String endpointPermissions)
"CONSUME" / "DELETE" / "READ_ONLY" / "NONE" / "MODIFY_TOPIC""void
setMessageTranslator(SolaceJcsmpMessageTranslator messageTranslator)
The message translator is responsible for translating the Solace JCSMP message object into anAdaptrisMessage
and the reverse.void
setTransacted(java.lang.Boolean transacted)
If set to 'true' will commit or rollback the consumed message upon success or failure during processing.void
start()
abstract void
startReceive()
void
stop()
-
Methods inherited from class com.adaptris.core.AdaptrisMessageConsumerImp
changeState, newThreadName, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState
-
Methods inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.AdaptrisMessageConsumer
consumeLocationKey
-
Methods inherited from interface com.adaptris.core.AdaptrisMessageWorker
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
-
-
-
Method Detail
-
onException
public void onException(com.solacesystems.jcsmp.JCSMPException exception)
- Specified by:
onException
in interfacecom.solacesystems.jcsmp.XMLMessageListener
-
onReceive
public void onReceive(com.solacesystems.jcsmp.BytesXMLMessage message)
- Specified by:
onReceive
in interfacecom.solacesystems.jcsmp.XMLMessageListener
-
init
public void init() throws CoreException
- Specified by:
init
in interfaceComponentLifecycle
- Throws:
CoreException
-
start
public void start() throws CoreException
- Specified by:
start
in interfaceComponentLifecycle
- Throws:
CoreException
-
stop
public void stop()
- Specified by:
stop
in interfaceComponentLifecycle
-
createConsumerFlowProperties
protected com.solacesystems.jcsmp.ConsumerFlowProperties createConsumerFlowProperties(com.solacesystems.jcsmp.Queue queue)
-
createEndpointProperties
protected com.solacesystems.jcsmp.EndpointProperties createEndpointProperties()
-
startReceive
public abstract void startReceive() throws java.lang.Exception
- Specified by:
startReceive
in interfaceSolaceJcsmpReceiverStarter
- Throws:
java.lang.Exception
-
getMessageTranslator
public SolaceJcsmpMessageTranslator getMessageTranslator()
The message translator is responsible for translating the Solace JCSMP message object into anAdaptrisMessage
and the reverse. The translator will typically handle the payload and the headers/metadata.
-
setMessageTranslator
public void setMessageTranslator(SolaceJcsmpMessageTranslator messageTranslator)
The message translator is responsible for translating the Solace JCSMP message object into anAdaptrisMessage
and the reverse. The translator will typically handle the payload and the headers/metadata.- Parameters:
messageTranslator
-
-
getEndpointPermissions
public java.lang.String getEndpointPermissions()
"CONSUME" / "DELETE" / "READ_ONLY" / "NONE" / "MODIFY_TOPIC""
This must match your end-point permissions on the Solace queue/topic.
-
setEndpointPermissions
public void setEndpointPermissions(java.lang.String endpointPermissions)
"CONSUME" / "DELETE" / "READ_ONLY" / "NONE" / "MODIFY_TOPIC""
This must match your end-point permissions on the Solace queue/topic.
- Parameters:
endpointPermissions
-
-
getEndpointAccessType
public java.lang.String getEndpointAccessType()
"EXCLUSIVE" / "NONEXCLUSIVE"
This must match your end-point configuration on the Solace queue/topic.
-
setEndpointAccessType
public void setEndpointAccessType(java.lang.String endpointAccessType)
"EXCLUSIVE" / "NONEXCLUSIVE"
This must match your end-point configuration on the Solace queue/topic.
- Parameters:
endpointAccessType
-
-
getAcknowledgeMode
public java.lang.String getAcknowledgeMode()
"CLIENT" / "AUTO"
Client acknowledge mode means Interlok will handle the Acknowledgements after the workflow has finished or the producer gives us a successful async callback.
-
setAcknowledgeMode
public void setAcknowledgeMode(java.lang.String acknowledgeMode)
"CLIENT" / "AUTO"
Client acknowledge mode means Interlok will handle the Acknowledgements after the workflow has finished or the producer gives us a successful async callback.
- Parameters:
acknowledgeMode
-
-
getTransacted
public java.lang.Boolean getTransacted()
If set to 'true' will commit or rollback the consumed message upon success or failure during processing.
-
setTransacted
public void setTransacted(java.lang.Boolean transacted)
If set to 'true' will commit or rollback the consumed message upon success or failure during processing.
-
-