|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ConsumerEndpoint
org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint
org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint
public class JmsConsumerEndpoint
A Sping-based JMS consumer endpoint.
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint |
|---|
PROP_JMS_CONTEXT |
| Fields inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
logger |
| Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
definition, description, endpoint, interfaceName, service, serviceUnit |
| Constructor Summary | |
|---|---|
JmsConsumerEndpoint()
|
|
JmsConsumerEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
|
|
JmsConsumerEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint |
|---|
configureExchangeTarget, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri |
| Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync |
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public JmsConsumerEndpoint()
public JmsConsumerEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
public JmsConsumerEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
| Method Detail |
|---|
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 AbstractConsumerEndpoint
public void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class AbstractConsumerEndpointjava.lang.Exception
public void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exception
public void stop()
throws java.lang.Exception
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exception
public void deactivate()
throws java.lang.Exception
deactivate in interface Endpointdeactivate in class AbstractConsumerEndpointjava.lang.Exception
public void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class ConsumerEndpointjavax.jbi.management.DeploymentExceptionprotected org.springframework.jms.listener.AbstractMessageListenerContainer createListenerContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||