|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.providers.AbstractConnector
org.mule.providers.jms.JmsConnector
public class JmsConnector
JmsConnector
is a JMS 1.0.2b compliant connector that can be used
by a Mule endpoint. The connector supports all JMS functionality including topics
and queues, durable subscribers, acknowledgement modes and local transactions.
Field Summary | |
---|---|
String |
password
|
String |
username
|
Fields inherited from interface org.mule.umo.provider.UMOConnector |
---|
INT_VALUE_NOT_SET |
Constructor Summary | |
---|---|
JmsConnector()
|
Method Summary | |
---|---|
protected void |
applyVendorSpecificConnectionFactoryProperties()
|
void |
close(MessageConsumer consumer)
Closes the MessageConsumer |
void |
close(MessageProducer producer)
Closes the MessageProducer |
void |
close(Session session)
Closes the Session |
void |
close(TemporaryQueue tempQueue)
Closes the TemporaryQueue |
void |
close(TemporaryTopic tempTopic)
Closes the TemporaryTopic |
void |
closeQuietly(MessageConsumer consumer)
Closes the MessageConsumer without throwing an exception (an error message is logged instead). |
void |
closeQuietly(MessageProducer producer)
Closes the MessageProducer without throwing an exception (an error message is logged instead). |
void |
closeQuietly(Session session)
Closes the Session without throwing an exception (an error message is logged instead). |
void |
closeQuietly(TemporaryQueue tempQueue)
Closes the TemporaryQueue without throwing an exception (an error message is logged instead). |
void |
closeQuietly(TemporaryTopic tempTopic)
Closes the TemporaryTopic without throwing an exception (an error message is logged instead). |
protected Connection |
createConnection()
|
protected ConnectionFactory |
createConnectionFactory()
|
protected RedeliveryHandler |
createRedeliveryHandler()
|
protected void |
doConnect()
Template method where any connections should be made for the connector |
protected void |
doDisconnect()
Template method where any connected resources used by the connector should be disconnected |
protected void |
doDispose()
Template method to perform any work when destroying the connectoe |
protected void |
doInitialise()
|
protected void |
doStart()
Template method to perform any work when starting the connectoe |
protected void |
doStop()
Template method to perform any work when stopping the connectoe |
int |
getAcknowledgementMode()
|
String |
getClientId()
|
Connection |
getConnection()
|
ConnectionFactory |
getConnectionFactory()
|
String |
getConnectionFactoryClass()
|
String |
getConnectionFactoryJndiName()
|
Map |
getConnectionFactoryProperties()
|
JmsSupport |
getJmsSupport()
|
Context |
getJndiContext()
|
String |
getJndiInitialFactory()
|
Map |
getJndiProviderProperties()
|
String |
getJndiProviderUrl()
|
int |
getMaxRedelivery()
|
UMOMessageAdapter |
getMessageAdapter(Object message)
Gets a UMOMessageAdapter for the endpoint for the given message
(data) |
String |
getPassword()
|
String |
getProtocol()
|
protected Object |
getReceiverKey(UMOComponent component,
UMOEndpoint endpoint)
The method determines the key used to store the receiver against. |
String |
getRedeliveryHandler()
|
ReplyToHandler |
getReplyToHandler()
Getter for property 'replyToHandler'. |
Session |
getSession(boolean transacted,
boolean topic)
|
Session |
getSession(UMOImmutableEndpoint endpoint)
|
Session |
getSessionFromTransaction()
|
String |
getSpecification()
|
JmsTopicResolver |
getTopicResolver()
Getter for property 'topicResolver'. |
String |
getUsername()
|
protected void |
initJndiContext()
|
boolean |
isCacheJmsSessions()
|
boolean |
isDurable()
|
boolean |
isEagerConsumer()
Getter for property 'eagerConsumer'. |
boolean |
isForceJndiDestinations()
|
boolean |
isHonorQosHeaders()
Gets the value of honorQosHeaders property. |
boolean |
isJndiDestinations()
|
boolean |
isNoLocal()
|
boolean |
isPersistentDelivery()
|
boolean |
isRecoverJmsConnections()
|
boolean |
isRemoteSyncEnabled()
|
void |
onNotification(UMOServerNotification notification)
|
Message |
preProcessMessage(Message message,
Session session)
This method may be overridden in order to apply pre-processing to the message as soon as it arrives. |
void |
setAcknowledgementMode(int acknowledgementMode)
|
void |
setCacheJmsSessions(boolean cacheJmsSessions)
|
void |
setClientId(String clientId)
|
protected void |
setConnection(Connection connection)
|
void |
setConnectionFactory(ConnectionFactory connectionFactory)
|
void |
setConnectionFactoryClass(String connectionFactoryClass)
|
void |
setConnectionFactoryJndiName(String connectionFactoryJndiName)
|
void |
setConnectionFactoryProperties(Map connectionFactoryProperties)
|
void |
setDurable(boolean durable)
|
void |
setEagerConsumer(boolean eagerConsumer)
A value of true will create a consumer on
connect, in contrast to lazy instantiation in the poll loop. |
void |
setForceJndiDestinations(boolean forceJndiDestinations)
|
void |
setHonorQosHeaders(boolean honorQosHeaders)
Sets honorQosHeaders property, which determines whether JmsMessageDispatcher
should honor incoming message's QoS headers (JMSPriority, JMSDeliveryMode). |
void |
setJmsSupport(JmsSupport jmsSupport)
|
void |
setJndiContext(Context jndiContext)
|
void |
setJndiDestinations(boolean jndiDestinations)
|
void |
setJndiInitialFactory(String jndiInitialFactory)
|
void |
setJndiProviderProperties(Map jndiProviderProperties)
|
void |
setJndiProviderUrl(String jndiProviderUrl)
|
void |
setMaxRedelivery(int maxRedelivery)
|
void |
setNoLocal(boolean noLocal)
|
void |
setPassword(String password)
|
void |
setPersistentDelivery(boolean persistentDelivery)
|
void |
setRecoverJmsConnections(boolean recover)
|
void |
setRedeliveryHandler(String redeliveryHandler)
|
void |
setSpecification(String specification)
|
void |
setTopicResolver(JmsTopicResolver topicResolver)
Setter for property 'topicResolver'. |
void |
setUsername(String username)
|
boolean |
supportsProperty(String property)
This method may be overridden in case a certain JMS implementation does not support all the standard JMS properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String username
public String password
Constructor Detail |
---|
public JmsConnector()
Method Detail |
---|
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractConnector
InitialisationException
protected void doDispose()
AbstractConnector
doDispose
in class AbstractConnector
protected void initJndiContext() throws NamingException, InitialisationException
NamingException
InitialisationException
protected void setConnection(Connection connection)
protected ConnectionFactory createConnectionFactory() throws InitialisationException, NamingException
InitialisationException
NamingException
protected Connection createConnection() throws NamingException, JMSException, InitialisationException
NamingException
JMSException
InitialisationException
protected void doConnect() throws ConnectException
AbstractConnector
doConnect
in class AbstractConnector
ConnectException
protected void applyVendorSpecificConnectionFactoryProperties()
protected void doDisconnect() throws ConnectException
AbstractConnector
doDisconnect
in class AbstractConnector
ConnectException
public UMOMessageAdapter getMessageAdapter(Object message) throws MessagingException
AbstractConnector
UMOMessageAdapter
for the endpoint for the given message
(data)
getMessageAdapter
in interface UMOConnector
getMessageAdapter
in class AbstractConnector
message
- the data with which to initialise the
UMOMessageAdapter
UMOMessageAdapter
for the endpoint
MessagingException
- if the message parameter is not supportedUMOMessageAdapter
protected Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
AbstractConnector
getReceiverKey
in class AbstractConnector
component
- the component for which the endpoint is being registeredendpoint
- the endpoint being registered for the component
public Session getSessionFromTransaction()
public Session getSession(UMOImmutableEndpoint endpoint) throws JMSException
JMSException
public Session getSession(boolean transacted, boolean topic) throws JMSException
JMSException
protected void doStart() throws UMOException
AbstractConnector
doStart
in class AbstractConnector
UMOException
- if the method failsprotected void doStop() throws UMOException
AbstractConnector
doStop
in class AbstractConnector
UMOException
- if the method failspublic String getProtocol()
getProtocol
in interface UMOConnector
public int getAcknowledgementMode()
public void setAcknowledgementMode(int acknowledgementMode)
acknowledgementMode
- The acknowledgementMode to set.public String getConnectionFactoryJndiName()
public void setConnectionFactoryJndiName(String connectionFactoryJndiName)
connectionFactoryJndiName
- The connectionFactoryJndiName to set.public boolean isDurable()
public void setDurable(boolean durable)
durable
- The durable to set.public boolean isNoLocal()
public void setNoLocal(boolean noLocal)
noLocal
- The noLocal to set.public boolean isPersistentDelivery()
public void setPersistentDelivery(boolean persistentDelivery)
persistentDelivery
- The persistentDelivery to set.public void setHonorQosHeaders(boolean honorQosHeaders)
honorQosHeaders
property, which determines whether JmsMessageDispatcher
should honor incoming message's QoS headers (JMSPriority, JMSDeliveryMode).
honorQosHeaders
- true
if JmsMessageDispatcher
should honor incoming
message's QoS headers; otherwise false
Default is false
, meaning that
connector settings will override message headers.public boolean isHonorQosHeaders()
honorQosHeaders
property.
true
if JmsMessageDispatcher
should honor incoming
message's QoS headers; otherwise false
Default is false
, meaning that
connector settings will override message headers.public Map getJndiProviderProperties()
public void setJndiProviderProperties(Map jndiProviderProperties)
jndiProviderProperties
- The JNDI providerProperties to set.public Map getConnectionFactoryProperties()
public void setConnectionFactoryProperties(Map connectionFactoryProperties)
connectionFactoryProperties
- properties to be set on the underlying
ConnectionFactory.public String getJndiInitialFactory()
public void setJndiInitialFactory(String jndiInitialFactory)
public String getJndiProviderUrl()
public void setJndiProviderUrl(String jndiProviderUrl)
public ConnectionFactory getConnectionFactory()
public void setConnectionFactory(ConnectionFactory connectionFactory)
public String getConnectionFactoryClass()
public void setConnectionFactoryClass(String connectionFactoryClass)
public JmsSupport getJmsSupport()
public void setJmsSupport(JmsSupport jmsSupport)
public String getSpecification()
public void setSpecification(String specification)
public boolean isJndiDestinations()
public void setJndiDestinations(boolean jndiDestinations)
public boolean isForceJndiDestinations()
public void setForceJndiDestinations(boolean forceJndiDestinations)
public Context getJndiContext()
public void setJndiContext(Context jndiContext)
public void setRecoverJmsConnections(boolean recover)
public boolean isRecoverJmsConnections()
protected RedeliveryHandler createRedeliveryHandler() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException, InstantiationException, ClassNotFoundException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
InstantiationException
ClassNotFoundException
public ReplyToHandler getReplyToHandler()
AbstractConnector
getReplyToHandler
in class AbstractConnector
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public Connection getConnection()
public String getClientId()
public void setClientId(String clientId)
public int getMaxRedelivery()
public void setMaxRedelivery(int maxRedelivery)
public String getRedeliveryHandler()
public void setRedeliveryHandler(String redeliveryHandler)
public boolean isRemoteSyncEnabled()
AbstractConnector
isRemoteSyncEnabled
in interface UMOConnector
isRemoteSyncEnabled
in class AbstractConnector
public JmsTopicResolver getTopicResolver()
public void setTopicResolver(JmsTopicResolver topicResolver)
topicResolver
- Value to set for property 'topicResolver'.public boolean isEagerConsumer()
true
.
eagerConsumer
public void setEagerConsumer(boolean eagerConsumer)
true
will create a consumer on
connect, in contrast to lazy instantiation in the poll loop.
This setting very much depends on the JMS vendor.
Affects transactional receivers, typical symptoms are:
eagerConsumer
- Value to set for property 'eagerConsumer'.eagerConsumer
,
XaTransactedJmsMessageReceiver
public void onNotification(UMOServerNotification notification)
onNotification
in interface UMOServerNotificationListener
public boolean isCacheJmsSessions()
public void setCacheJmsSessions(boolean cacheJmsSessions)
public boolean supportsProperty(String property)
public Message preProcessMessage(Message message, Session session) throws Exception
message
- - the incoming messagesession
- - the JMS session
Exception
public void close(MessageProducer producer) throws JMSException
producer
-
JMSException
public void closeQuietly(MessageProducer producer)
producer
- public void close(MessageConsumer consumer) throws JMSException
consumer
-
JMSException
public void closeQuietly(MessageConsumer consumer)
consumer
- public void close(Session session) throws JMSException
session
-
JMSException
public void closeQuietly(Session session)
session
- public void close(TemporaryQueue tempQueue) throws JMSException
tempQueue
-
JMSException
public void closeQuietly(TemporaryQueue tempQueue)
tempQueue
- public void close(TemporaryTopic tempTopic) throws JMSException
tempTopic
-
JMSException
public void closeQuietly(TemporaryTopic tempTopic)
tempTopic
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |