Class ActiveMQActivation
- java.lang.Object
-
- org.apache.activemq.artemis.ra.inflow.ActiveMQActivation
-
public class ActiveMQActivation extends java.lang.ObjectThe activation.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.reflect.MethodONMESSAGEThe onMessage method
-
Constructor Summary
Constructors Constructor Description ActiveMQActivation(ActiveMQResourceAdapter ra, javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, ActiveMQActivationSpec spec)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiveMQActivationSpecgetActivationSpec()Get the activation specorg.apache.activemq.artemis.api.core.SimpleStringgetAddress()org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactorygetConnectionFactory()javax.resource.spi.endpoint.MessageEndpointFactorygetMessageEndpointFactory()Get the message endpoint factoryorg.apache.activemq.artemis.api.core.SimpleStringgetTopicTemporaryQueue()javax.resource.spi.work.WorkManagergetWorkManager()Get the work managerjava.util.List<javax.transaction.xa.XAResource>getXAResources()booleanisDeliveryTransacted()Get whether delivery is transactedbooleanisTopic()Is the destination a topicvoidreconnect(java.lang.Throwable failure, boolean useInterrupt)Drops all existing connection-related resources and reconnectsvoidsetTopicTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString topicTemporaryQueue)protected voidsetup()Setup the activationprotected voidsetupCF()protected voidsetupDestination()protected org.apache.activemq.artemis.api.core.client.ClientSessionsetupSession(org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf)Setup a sessionvoidstart()Start the activationvoidstartReconnectThread(java.lang.String cause)voidstop()Stop the activationprotected voidteardown(boolean useInterrupt)Teardown the activationjava.lang.StringtoString()Get a string representation
-
-
-
Constructor Detail
-
ActiveMQActivation
public ActiveMQActivation(ActiveMQResourceAdapter ra, javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, ActiveMQActivationSpec spec) throws javax.resource.ResourceException
Constructor- Parameters:
ra- The resource adapterendpointFactory- The endpoint factoryspec- The activation spec- Throws:
javax.resource.ResourceException- Thrown if an error occurs
-
-
Method Detail
-
getActivationSpec
public ActiveMQActivationSpec getActivationSpec()
Get the activation spec- Returns:
- The value
-
getMessageEndpointFactory
public javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
Get the message endpoint factory- Returns:
- The value
-
isDeliveryTransacted
public boolean isDeliveryTransacted()
Get whether delivery is transacted- Returns:
- The value
-
getWorkManager
public javax.resource.spi.work.WorkManager getWorkManager()
Get the work manager- Returns:
- The value
-
isTopic
public boolean isTopic()
Is the destination a topic- Returns:
- The value
-
start
public void start() throws javax.resource.ResourceExceptionStart the activation- Throws:
javax.resource.ResourceException- Thrown if an error occurs
-
getTopicTemporaryQueue
public org.apache.activemq.artemis.api.core.SimpleString getTopicTemporaryQueue()
- Returns:
- the topicTemporaryQueue
-
setTopicTemporaryQueue
public void setTopicTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString topicTemporaryQueue)
- Parameters:
topicTemporaryQueue- the topicTemporaryQueue to set
-
getXAResources
public java.util.List<javax.transaction.xa.XAResource> getXAResources()
- Returns:
- the list of XAResources for this activation endpoint
-
stop
public void stop()
Stop the activation
-
setup
protected void setup() throws java.lang.ExceptionSetup the activation- Throws:
java.lang.Exception- Thrown if an error occurs
-
teardown
protected void teardown(boolean useInterrupt)
Teardown the activation
-
setupCF
protected void setupCF() throws java.lang.Exception- Throws:
java.lang.Exception
-
setupSession
protected org.apache.activemq.artemis.api.core.client.ClientSession setupSession(org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf) throws java.lang.ExceptionSetup a session- Parameters:
cf-- Returns:
- The connection
- Throws:
java.lang.Exception- Thrown if an error occurs
-
getAddress
public org.apache.activemq.artemis.api.core.SimpleString getAddress()
-
setupDestination
protected void setupDestination() throws java.lang.Exception- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
Get a string representation- Overrides:
toStringin classjava.lang.Object- Returns:
- The value
-
startReconnectThread
public void startReconnectThread(java.lang.String cause)
-
reconnect
public void reconnect(java.lang.Throwable failure, boolean useInterrupt)Drops all existing connection-related resources and reconnects- Parameters:
failure- if reconnecting in the event of a failure
-
getConnectionFactory
public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory getConnectionFactory()
-
-