public class JmsConsumerEndpoint extends AbstractConsumerEndpoint implements JmsEndpointType
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LISTENER_TYPE_DEFAULT |
static java.lang.String |
LISTENER_TYPE_SIMPLE |
static java.lang.String |
TRANSACTED_JMS |
static java.lang.String |
TRANSACTED_NONE |
static java.lang.String |
TRANSACTED_XA |
PROP_JMS_CONTEXTloggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
JmsConsumerEndpoint() |
JmsConsumerEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint) |
JmsConsumerEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected org.springframework.jms.listener.AbstractMessageListenerContainer |
createListenerContainer() |
void |
deactivate() |
int |
getCacheLevel() |
java.lang.String |
getClientId() |
int |
getConcurrentConsumers() |
javax.jms.Destination |
getDestination() |
java.lang.String |
getDestinationName() |
java.lang.String |
getDurableSubscriptionName() |
javax.jms.ExceptionListener |
getExceptionListener() |
int |
getIdleTaskExecutionLimit() |
java.lang.String |
getListenerType() |
java.lang.String |
getLocationURI() |
int |
getMaxConcurrentConsumers() |
int |
getMaxMessagesPerTask() |
java.lang.String |
getMessageSelector() |
long |
getReceiveTimeout() |
long |
getRecoveryInterval() |
int |
getSessionAcknowledgeMode() |
java.lang.String |
getTransacted() |
boolean |
isPubSubNoLocal() |
boolean |
isSubscriptionDurable() |
void |
setCacheLevel(int cacheLevel)
Specifies the level of caching allowed by the listener.
|
void |
setClientId(java.lang.String clientId)
Specifies the JMS client id for a shared
Connection created and used by
this listener. |
void |
setConcurrentConsumers(int concurrentConsumers)
Specifies the number of concurrent consumers created by the listener.
|
void |
setDestination(javax.jms.Destination destination)
Specifies the JMS
Destination used to receive messages. |
void |
setDestinationName(java.lang.String destinationName)
Specifies a string identifying the JMS destination used to recieve
messages.
|
void |
setDurableSubscriptionName(java.lang.String durableSubscriptionName)
Specifies the name used to register the durable subscription.
|
void |
setExceptionListener(javax.jms.ExceptionListener exceptionListener)
Specifies an
ExceptionListener to notify in case of a
JMSException is thrown by the registered message listener or
the invocation infrastructure. |
void |
setIdleTaskExecutionLimit(int idleTaskExecutionLimit)
Specifies the limit for idle executions of a receive task, not having received any message within its execution.
|
void |
setListenerType(java.lang.String listenerType)
Specifies the type of Spring JMS message listener to use.
|
void |
setMaxConcurrentConsumers(int maxConcurrentConsumers)
Specifies the maximum number of concurrent consumers created by the listener.
|
void |
setMaxMessagesPerTask(int maxMessagesPerTask)
Specifies the number of attempts to receive messages per task.
|
void |
setMessageSelector(java.lang.String messageSelector)
Specifies the message selector string to use.
|
void |
setPubSubNoLocal(boolean pubSubNoLocal)
Specifies if messages published by the listener's
Connection
are suppressed. |
void |
setReceiveTimeout(long receiveTimeout)
Specifies the timeout for receiving a message in milliseconds.
|
void |
setRecoveryInterval(long recoveryInterval)
Specifies the interval, in milliseconds, between attempts to recover after
a failed listener set-up.
|
void |
setSessionAcknowledgeMode(int sessionAcknowledgeMode)
Specifies the acknowledgment mode that is used when creating a
Session to send a message. |
void |
setSubscriptionDurable(boolean subscriptionDurable)
Specifies if the listener uses a durable subscription to listen for
messages.
|
void |
setTransacted(java.lang.String transacted)
Specifies the type of transaction used to wrap the message exchanges.
|
void |
start() |
void |
stop() |
void |
validate() |
getConnectionFactory, getDestinationChooser, getDestinationResolver, getMarshaler, getReplyDeliveryMode, getReplyDestination, getReplyDestination, getReplyDestinationName, getReplyPriority, getReplyProperties, getReplyTimeToLive, getStore, getStoreFactory, getUseMessageIdInResponse, handleException, isJms102, isPubSubDomain, isReplyExplicitQosEnabled, isStateless, isSynchronous, onMessage, process, processExchange, send, sendError, setConnectionFactory, setCorrelationId, setDestinationChooser, setDestinationResolver, setJms102, setMarshaler, setPubSubDomain, setReplyDeliveryMode, setReplyDestination, setReplyDestinationName, setReplyExplicitQosEnabled, setReplyPriority, setReplyProperties, setReplyTimeToLive, setStateless, setStore, setStoreFactory, setSynchronous, setUseMessageIdInResponse, treatExceptionAsFaultconfigureExchangeTarget, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUridone, fail, getChannel, getContext, getExchangeFactory, send, sendSyncgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic static final java.lang.String LISTENER_TYPE_DEFAULT
public static final java.lang.String LISTENER_TYPE_SIMPLE
public static final java.lang.String TRANSACTED_NONE
public static final java.lang.String TRANSACTED_XA
public static final java.lang.String TRANSACTED_JMS
public JmsConsumerEndpoint()
public JmsConsumerEndpoint(DefaultComponent component, javax.jbi.servicedesc.ServiceEndpoint endpoint)
public JmsConsumerEndpoint(ServiceUnit serviceUnit, javax.xml.namespace.QName service, java.lang.String endpoint)
public java.lang.String getTransacted()
public void setTransacted(java.lang.String transacted)
none, xa, and jms.transacted - the type of transaction wrapper to usepublic int getCacheLevel()
public void setCacheLevel(int cacheLevel)
CACHE_NONECACHE_CONNECTIONCACHE_SESSIONCACHE_CONSUMERCACHE_NONE.listenerType
property is set to default.cacheLevel - the cacheLevel to setDefaultMessageListenerContainer.setCacheLevel(int)public java.lang.String getClientId()
public void setClientId(java.lang.String clientId)
Connection created and used by
this listener.clientId - the clientId to setAbstractJmsListeningContainer.setClientId(String)public int getConcurrentConsumers()
public void setConcurrentConsumers(int concurrentConsumers)
listenerType
property is set to either simple or default.concurrentConsumers - the number of concurrent consumers to createDefaultMessageListenerContainer.setConcurrentConsumers(int),
SimpleMessageListenerContainer.setConcurrentConsumers(int)public javax.jms.Destination getDestination()
public void setDestination(javax.jms.Destination destination)
Destination used to receive messages.destination - the JMS destinationAbstractMessageListenerContainer.setDestination(Destination)public java.lang.String getDestinationName()
public void setDestinationName(java.lang.String destinationName)
DesitinationResolver.destinationName - the destination nameAbstractMessageListenerContainer.setDestinationName(String)public java.lang.String getDurableSubscriptionName()
public void setDurableSubscriptionName(java.lang.String durableSubscriptionName)
durableSubscriptionName - the registration nameAbstractMessageListenerContainer.setDurableSubscriptionName(String)public javax.jms.ExceptionListener getExceptionListener()
public void setExceptionListener(javax.jms.ExceptionListener exceptionListener)
ExceptionListener to notify in case of a
JMSException is thrown by the registered message listener or
the invocation infrastructure.exceptionListener - the exception listenerAbstractMessageListenerContainer.setExceptionListener(ExceptionListener)public int getIdleTaskExecutionLimit()
public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit)
listenerType
property is set to default.idleTaskExecutionLimit - the number of concurrent consumers to createDefaultMessageListenerContainer.setIdleTaskExecutionLimit(int)public java.lang.String getListenerType()
public void setListenerType(java.lang.String listenerType)
default, simple, and server.listenerType - the listener typepublic int getMaxConcurrentConsumers()
public void setMaxConcurrentConsumers(int maxConcurrentConsumers)
listenerType
property is set to default.maxConcurrentConsumers - the maximum number of concurrent consumers to createDefaultMessageListenerContainer.setMaxConcurrentConsumers(int)public int getMaxMessagesPerTask()
public void setMaxMessagesPerTask(int maxMessagesPerTask)
listenerType
property is set to either default or simple.maxMessagesPerTask - the number of attempts to makeDefaultMessageListenerContainer.setMaxMessagesPerTask(int)public java.lang.String getMessageSelector()
public void setMessageSelector(java.lang.String messageSelector)
messageSelector - the message selector stringAbstractMessageListenerContainer.setMessageSelector(String)public boolean isPubSubNoLocal()
public void setPubSubNoLocal(boolean pubSubNoLocal)
Connection
are suppressed. The default is false.listenerType
property is set to either default or simple.pubSubNoLocal - messages are surpressed?AbstractPollingMessageListenerContainer.setPubSubNoLocal(boolean),
SimpleMessageListenerContainer.setPubSubNoLocal(boolean)public long getReceiveTimeout()
public void setReceiveTimeout(long receiveTimeout)
listenerType
property is set to default.receiveTimeout - the number of milliseconds before timing outAbstractPollingMessageListenerContainer.setReceiveTimeout(long)public long getRecoveryInterval()
public void setRecoveryInterval(long recoveryInterval)
listenerType
property is set to default.recoveryInterval - the number of milliseconds to waitDefaultMessageListenerContainer.setRecoveryInterval(long)public int getSessionAcknowledgeMode()
public void setSessionAcknowledgeMode(int sessionAcknowledgeMode)
Session to send a message. Deafults to
Session.AUTO_ACKNOWLEDGE.sessionAcknowledgeMode - the sessionAcknowledgeMode to setJmsAccessor.setSessionAcknowledgeMode(int)public boolean isSubscriptionDurable()
public void setSubscriptionDurable(boolean subscriptionDurable)
false.subscriptionDurable - the listener uses a durable subscription?AbstractMessageListenerContainer.setSubscriptionDurable(boolean)public java.lang.String getLocationURI()
getLocationURI in class AbstractConsumerEndpointpublic void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class AbstractConsumerEndpointjava.lang.Exceptionpublic void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exceptionpublic void deactivate()
throws java.lang.Exception
deactivate in interface Endpointdeactivate in class AbstractConsumerEndpointjava.lang.Exceptionpublic void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class ConsumerEndpointjavax.jbi.management.DeploymentExceptionprotected org.springframework.jms.listener.AbstractMessageListenerContainer createListenerContainer()
Copyright © 2005-2014 FuseSource. All Rights Reserved.