Class ActiveMQActivation
- java.lang.Object
-
- org.apache.activemq.artemis.ra.inflow.ActiveMQActivation
-
public class ActiveMQActivation extends Object
The activation.
-
-
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 specSimpleStringgetAddress()ActiveMQConnectionFactorygetConnectionFactory()javax.resource.spi.endpoint.MessageEndpointFactorygetMessageEndpointFactory()Get the message endpoint factorySimpleStringgetTopicTemporaryQueue()javax.resource.spi.work.WorkManagergetWorkManager()Get the work managerList<XAResource>getXAResources()booleanisDeliveryTransacted()Get whether delivery is transactedbooleanisTopic()Is the destination a topicvoidreconnect(Throwable failure, boolean useInterrupt)Drops all existing connection-related resources and reconnectsvoidsetTopicTemporaryQueue(SimpleString topicTemporaryQueue)protected voidsetup()Setup the activationprotected voidsetupCF()protected voidsetupDestination()protected ClientSessionsetupSession(ClientSessionFactory cf)Setup a sessionvoidstart()Start the activationvoidstartReconnectThread(String cause)voidstop()Stop the activationprotected voidteardown(boolean useInterrupt)Teardown the activationStringtoString()Get a string representation
-
-
-
Field Detail
-
ONMESSAGE
public static final Method ONMESSAGE
The onMessage method
-
-
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 SimpleString getTopicTemporaryQueue()
- Returns:
- the topicTemporaryQueue
-
setTopicTemporaryQueue
public void setTopicTemporaryQueue(SimpleString topicTemporaryQueue)
- Parameters:
topicTemporaryQueue- the topicTemporaryQueue to set
-
getXAResources
public List<XAResource> getXAResources()
- Returns:
- the list of XAResources for this activation endpoint
-
stop
public void stop()
Stop the activation
-
setup
protected void setup() throws ExceptionSetup the activation- Throws:
Exception- Thrown if an error occurs
-
teardown
protected void teardown(boolean useInterrupt)
Teardown the activation
-
setupSession
protected ClientSession setupSession(ClientSessionFactory cf) throws Exception
Setup a session- Parameters:
cf-- Returns:
- The connection
- Throws:
Exception- Thrown if an error occurs
-
getAddress
public SimpleString getAddress()
-
toString
public String toString()
Get a string representation
-
startReconnectThread
public void startReconnectThread(String cause)
-
reconnect
public void reconnect(Throwable failure, boolean useInterrupt)
Drops all existing connection-related resources and reconnects- Parameters:
failure- if reconnecting in the event of a failure
-
getConnectionFactory
public ActiveMQConnectionFactory getConnectionFactory()
-
-