org.apache.activemq.ra
Class ActiveMQActivationSpec

java.lang.Object
  extended by org.apache.activemq.ra.ActiveMQActivationSpec
All Implemented Interfaces:
Serializable, ActivationSpec, ResourceAdapterAssociation, MessageActivationSpec

public class ActiveMQActivationSpec
extends Object
implements MessageActivationSpec, Serializable

Configures the inbound JMS consumer specification using ActiveMQ

See Also:
Serialized Form

Field Summary
static String AUTO_ACKNOWLEDGE_MODE
          Auto-acknowledge constant for acknowledgeMode property *
static String DUPS_OK_ACKNOWLEDGE_MODE
          Dups-ok-acknowledge constant for acknowledgeMode property *
static String DURABLE_SUBSCRIPTION
          Durable constant for subscriptionDurability property *
static int INVALID_ACKNOWLEDGE_MODE
           
static String NON_DURABLE_SUBSCRIPTION
          NonDurable constant for subscriptionDurability property *
 
Constructor Summary
ActiveMQActivationSpec()
           
 
Method Summary
 ActiveMQDestination createDestination()
           
 String getAcknowledgeMode()
           
 int getAcknowledgeModeForSession()
           
 double getBackOffMultiplier()
           
 String getClientId()
           
 String getDestination()
           
 String getDestinationType()
           
 String getEnableBatch()
           
 boolean getEnableBatchBooleanValue()
           
 long getInitialRedeliveryDelay()
           
 int getMaximumRedeliveries()
           
 long getMaximumRedeliveryDelay()
           
 String getMaxMessagesPerBatch()
           
 int getMaxMessagesPerBatchIntValue()
           
 String getMaxMessagesPerSessions()
           
 int getMaxMessagesPerSessionsIntValue()
           
 String getMaxSessions()
           
 int getMaxSessionsIntValue()
           
 String getMessageSelector()
           
 String getNoLocal()
           
 boolean getNoLocalBooleanValue()
           
 String getPassword()
           
 ResourceAdapter getResourceAdapter()
           
 String getSubscriptionDurability()
           
 String getSubscriptionName()
           
 String getUseRAManagedTransaction()
           
 String getUserName()
           
 boolean isDurableSubscription()
           
 boolean isEmpty(String value)
           
 boolean isUseExponentialBackOff()
           
 boolean isUseJndi()
           
 boolean isUseRAManagedTransactionEnabled()
           
 boolean isValidAcknowledgeMode(List<String> errorMessages)
           
 boolean isValidClientId(List<String> errorMessages)
           
 boolean isValidDestination(List<String> errorMessages)
           
 boolean isValidDestinationType(List<String> errorMessages)
           
 boolean isValidEnableBatch(List<String> errorMessages)
           
 boolean isValidMaxMessagesPerBatch(List<String> errorMessages)
           
 boolean isValidMaxMessagesPerSessions(List<String> errorMessages)
           
 boolean isValidMaxSessions(List<String> errorMessages)
           
 boolean isValidMessageSelector(List<String> errorMessages)
           
 boolean isValidNoLocal(List<String> errorMessages)
           
 boolean isValidSubscriptionDurability(List<String> errorMessages)
           
 boolean isValidSubscriptionName(List<String> errorMessages)
           
 boolean isValidUseRAManagedTransaction(List<String> errorMessages)
           
 RedeliveryPolicy lazyCreateRedeliveryPolicy()
           
 RedeliveryPolicy redeliveryPolicy()
           
 void setAcknowledgeMode(String acknowledgeMode)
           
 void setActiveMQDestination(ActiveMQDestination destination)
          A helper method mostly for use in Dependency Injection containers which allows you to customize the destination and destinationType properties from a single ActiveMQDestination POJO
 void setBackOffMultiplier(double backOffMultiplier)
           
 void setClientId(String clientId)
           
 void setDestination(String destination)
           
 void setDestinationType(String destinationType)
           
 void setEnableBatch(String enableBatch)
           
 void setInitialRedeliveryDelay(long initialRedeliveryDelay)
           
 void setMaximumRedeliveries(int maximumRedeliveries)
           
 void setMaximumRedeliveryDelay(long maximumRedeliveryDelay)
           
 void setMaxMessagesPerBatch(String maxMessagesPerBatch)
           
 void setMaxMessagesPerSessions(String maxMessagesPerSessions)
           
 void setMaxSessions(String maxSessions)
           
 void setMessageSelector(String messageSelector)
           
 void setNoLocal(String noLocal)
           
 void setPassword(String password)
           
 void setResourceAdapter(ResourceAdapter resourceAdapter)
           
 void setSubscriptionDurability(String subscriptionDurability)
           
 void setSubscriptionName(String subscriptionName)
           
 void setUseExponentialBackOff(boolean useExponentialBackOff)
           
 void setUseJndi(boolean useJndi)
           
 void setUseRAManagedTransaction(String useRAManagedTransaction)
           
 void setUserName(String userName)
           
 String toString()
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO_ACKNOWLEDGE_MODE

public static final String AUTO_ACKNOWLEDGE_MODE
Auto-acknowledge constant for acknowledgeMode property *

See Also:
Constant Field Values

DUPS_OK_ACKNOWLEDGE_MODE

public static final String DUPS_OK_ACKNOWLEDGE_MODE
Dups-ok-acknowledge constant for acknowledgeMode property *

See Also:
Constant Field Values

DURABLE_SUBSCRIPTION

public static final String DURABLE_SUBSCRIPTION
Durable constant for subscriptionDurability property *

See Also:
Constant Field Values

NON_DURABLE_SUBSCRIPTION

public static final String NON_DURABLE_SUBSCRIPTION
NonDurable constant for subscriptionDurability property *

See Also:
Constant Field Values

INVALID_ACKNOWLEDGE_MODE

public static final int INVALID_ACKNOWLEDGE_MODE
See Also:
Constant Field Values
Constructor Detail

ActiveMQActivationSpec

public ActiveMQActivationSpec()
Method Detail

validate

public void validate()
              throws InvalidPropertyException
Specified by:
validate in interface ActivationSpec
Throws:
InvalidPropertyException
See Also:
ActivationSpec.validate()

isValidUseRAManagedTransaction

public boolean isValidUseRAManagedTransaction(List<String> errorMessages)
Specified by:
isValidUseRAManagedTransaction in interface MessageActivationSpec

isValidNoLocal

public boolean isValidNoLocal(List<String> errorMessages)
Specified by:
isValidNoLocal in interface MessageActivationSpec

isValidMessageSelector

public boolean isValidMessageSelector(List<String> errorMessages)
Specified by:
isValidMessageSelector in interface MessageActivationSpec

isValidMaxSessions

public boolean isValidMaxSessions(List<String> errorMessages)
Specified by:
isValidMaxSessions in interface MessageActivationSpec

isValidMaxMessagesPerSessions

public boolean isValidMaxMessagesPerSessions(List<String> errorMessages)
Specified by:
isValidMaxMessagesPerSessions in interface MessageActivationSpec

isValidMaxMessagesPerBatch

public boolean isValidMaxMessagesPerBatch(List<String> errorMessages)
Specified by:
isValidMaxMessagesPerBatch in interface MessageActivationSpec

isValidEnableBatch

public boolean isValidEnableBatch(List<String> errorMessages)
Specified by:
isValidEnableBatch in interface MessageActivationSpec

getResourceAdapter

public ResourceAdapter getResourceAdapter()
Specified by:
getResourceAdapter in interface ResourceAdapterAssociation
Specified by:
getResourceAdapter in interface MessageActivationSpec
See Also:
ResourceAdapterAssociation.getResourceAdapter()

setResourceAdapter

public void setResourceAdapter(ResourceAdapter resourceAdapter)
                        throws ResourceException
Specified by:
setResourceAdapter in interface ResourceAdapterAssociation
Throws:
ResourceException
See Also:
ResourceAdapterAssociation.setResourceAdapter(javax.resource.spi.ResourceAdapter)

getDestinationType

public String getDestinationType()
Specified by:
getDestinationType in interface MessageActivationSpec
Returns:
Returns the destinationType.

setDestinationType

public void setDestinationType(String destinationType)
Parameters:
destinationType - The destinationType to set.

getPassword

public String getPassword()
Specified by:
getPassword in interface MessageActivationSpec

setPassword

public void setPassword(String password)

getUserName

public String getUserName()
Specified by:
getUserName in interface MessageActivationSpec

setUserName

public void setUserName(String userName)

getMessageSelector

public String getMessageSelector()
Specified by:
getMessageSelector in interface MessageActivationSpec
Returns:
Returns the messageSelector.

setMessageSelector

public void setMessageSelector(String messageSelector)
Parameters:
messageSelector - The messageSelector to set.

getNoLocal

public String getNoLocal()
Specified by:
getNoLocal in interface MessageActivationSpec
Returns:
Returns the noLocal.

setNoLocal

public void setNoLocal(String noLocal)
Parameters:
noLocal - The noLocal to set.

getAcknowledgeMode

public String getAcknowledgeMode()
Specified by:
getAcknowledgeMode in interface MessageActivationSpec

setAcknowledgeMode

public void setAcknowledgeMode(String acknowledgeMode)

getClientId

public String getClientId()
Specified by:
getClientId in interface MessageActivationSpec

setClientId

public void setClientId(String clientId)

getDestination

public String getDestination()
Specified by:
getDestination in interface MessageActivationSpec

setDestination

public void setDestination(String destination)

getSubscriptionDurability

public String getSubscriptionDurability()
Specified by:
getSubscriptionDurability in interface MessageActivationSpec

setSubscriptionDurability

public void setSubscriptionDurability(String subscriptionDurability)

getSubscriptionName

public String getSubscriptionName()
Specified by:
getSubscriptionName in interface MessageActivationSpec

setSubscriptionName

public void setSubscriptionName(String subscriptionName)

isValidSubscriptionName

public boolean isValidSubscriptionName(List<String> errorMessages)
Specified by:
isValidSubscriptionName in interface MessageActivationSpec

isValidClientId

public boolean isValidClientId(List<String> errorMessages)
Specified by:
isValidClientId in interface MessageActivationSpec

isDurableSubscription

public boolean isDurableSubscription()
Specified by:
isDurableSubscription in interface MessageActivationSpec

isValidSubscriptionDurability

public boolean isValidSubscriptionDurability(List<String> errorMessages)
Specified by:
isValidSubscriptionDurability in interface MessageActivationSpec

isValidAcknowledgeMode

public boolean isValidAcknowledgeMode(List<String> errorMessages)
Specified by:
isValidAcknowledgeMode in interface MessageActivationSpec

isValidDestinationType

public boolean isValidDestinationType(List<String> errorMessages)
Specified by:
isValidDestinationType in interface MessageActivationSpec

isValidDestination

public boolean isValidDestination(List<String> errorMessages)
Specified by:
isValidDestination in interface MessageActivationSpec

isEmpty

public boolean isEmpty(String value)
Specified by:
isEmpty in interface MessageActivationSpec

toString

public String toString()
Overrides:
toString in class Object

getAcknowledgeModeForSession

public int getAcknowledgeModeForSession()
Specified by:
getAcknowledgeModeForSession in interface MessageActivationSpec

setActiveMQDestination

public void setActiveMQDestination(ActiveMQDestination destination)
A helper method mostly for use in Dependency Injection containers which allows you to customize the destination and destinationType properties from a single ActiveMQDestination POJO


createDestination

public ActiveMQDestination createDestination()

getMaxMessagesPerSessions

public String getMaxMessagesPerSessions()
Specified by:
getMaxMessagesPerSessions in interface MessageActivationSpec

setMaxMessagesPerSessions

public void setMaxMessagesPerSessions(String maxMessagesPerSessions)

getMaxSessions

public String getMaxSessions()
Specified by:
getMaxSessions in interface MessageActivationSpec

setMaxSessions

public void setMaxSessions(String maxSessions)

getUseRAManagedTransaction

public String getUseRAManagedTransaction()
Specified by:
getUseRAManagedTransaction in interface MessageActivationSpec

setUseRAManagedTransaction

public void setUseRAManagedTransaction(String useRAManagedTransaction)

getMaxMessagesPerSessionsIntValue

public int getMaxMessagesPerSessionsIntValue()
Specified by:
getMaxMessagesPerSessionsIntValue in interface MessageActivationSpec

getMaxSessionsIntValue

public int getMaxSessionsIntValue()
Specified by:
getMaxSessionsIntValue in interface MessageActivationSpec

isUseRAManagedTransactionEnabled

public boolean isUseRAManagedTransactionEnabled()
Specified by:
isUseRAManagedTransactionEnabled in interface MessageActivationSpec

getNoLocalBooleanValue

public boolean getNoLocalBooleanValue()
Specified by:
getNoLocalBooleanValue in interface MessageActivationSpec

getEnableBatch

public String getEnableBatch()
Specified by:
getEnableBatch in interface MessageActivationSpec

setEnableBatch

public void setEnableBatch(String enableBatch)

getEnableBatchBooleanValue

public boolean getEnableBatchBooleanValue()
Specified by:
getEnableBatchBooleanValue in interface MessageActivationSpec

getMaxMessagesPerBatchIntValue

public int getMaxMessagesPerBatchIntValue()
Specified by:
getMaxMessagesPerBatchIntValue in interface MessageActivationSpec

getMaxMessagesPerBatch

public String getMaxMessagesPerBatch()
Specified by:
getMaxMessagesPerBatch in interface MessageActivationSpec

setMaxMessagesPerBatch

public void setMaxMessagesPerBatch(String maxMessagesPerBatch)

getBackOffMultiplier

public double getBackOffMultiplier()
Specified by:
getBackOffMultiplier in interface MessageActivationSpec

getInitialRedeliveryDelay

public long getInitialRedeliveryDelay()
Specified by:
getInitialRedeliveryDelay in interface MessageActivationSpec

getMaximumRedeliveries

public int getMaximumRedeliveries()
Specified by:
getMaximumRedeliveries in interface MessageActivationSpec

isUseExponentialBackOff

public boolean isUseExponentialBackOff()
Specified by:
isUseExponentialBackOff in interface MessageActivationSpec

setBackOffMultiplier

public void setBackOffMultiplier(double backOffMultiplier)

getMaximumRedeliveryDelay

public long getMaximumRedeliveryDelay()
Specified by:
getMaximumRedeliveryDelay in interface MessageActivationSpec

setMaximumRedeliveryDelay

public void setMaximumRedeliveryDelay(long maximumRedeliveryDelay)

setInitialRedeliveryDelay

public void setInitialRedeliveryDelay(long initialRedeliveryDelay)

setMaximumRedeliveries

public void setMaximumRedeliveries(int maximumRedeliveries)

setUseExponentialBackOff

public void setUseExponentialBackOff(boolean useExponentialBackOff)

redeliveryPolicy

public RedeliveryPolicy redeliveryPolicy()
Specified by:
redeliveryPolicy in interface MessageActivationSpec

lazyCreateRedeliveryPolicy

public RedeliveryPolicy lazyCreateRedeliveryPolicy()
Specified by:
lazyCreateRedeliveryPolicy in interface MessageActivationSpec

setUseJndi

public void setUseJndi(boolean useJndi)

isUseJndi

public boolean isUseJndi()
Specified by:
isUseJndi in interface MessageActivationSpec


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.