|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.AbstractConnector
org.mule.transport.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 | |
|---|---|
static String |
JMS
|
String |
password
|
String |
username
|
| Fields inherited from class org.mule.transport.AbstractConnector |
|---|
connected, connectedSemaphore, connecting, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect |
| Fields inherited from interface org.mule.api.transport.Connector |
|---|
INT_VALUE_NOT_SET |
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Startable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Stoppable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
JmsConnector()
|
|
| Method Summary | |
|---|---|
void |
close(MessageConsumer consumer)
Closes the MessageConsumer |
void |
close(MessageProducer producer)
Closes the MessageProducer |
void |
close(Session session)
Closes the MuleSession |
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 MuleSession 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 void |
doConnect()
|
protected void |
doDisconnect()
|
protected void |
doDispose()
|
protected void |
doInitialise()
|
protected void |
doStart()
|
protected void |
doStop()
|
int |
getAcknowledgementMode()
|
String |
getClientId()
|
Connection |
getConnection()
|
ConnectionFactory |
getConnectionFactory()
|
protected ConnectionFactory |
getDefaultConnectionFactory()
Override this method to provide a default ConnectionFactory for a vendor-specific JMS Connector. |
JmsSupport |
getJmsSupport()
|
int |
getMaxRedelivery()
|
MessageAdapter |
getMessageAdapter(Object message)
|
String |
getPassword()
|
String |
getProtocol()
|
protected Object |
getReceiverKey(Service service,
InboundEndpoint endpoint)
|
RedeliveryHandlerFactory |
getRedeliveryHandlerFactory()
|
ReplyToHandler |
getReplyToHandler()
|
Session |
getSession(boolean transacted,
boolean topic)
|
Session |
getSession(ImmutableEndpoint endpoint)
|
Session |
getSessionFromTransaction()
|
String |
getSpecification()
|
JmsTopicResolver |
getTopicResolver()
Getter for property 'topicResolver'. |
String |
getUsername()
|
boolean |
isCacheJmsSessions()
|
boolean |
isDurable()
|
boolean |
isEagerConsumer()
Getter for property 'eagerConsumer'. |
boolean |
isHonorQosHeaders()
Gets the value of honorQosHeaders property. |
boolean |
isNoLocal()
|
boolean |
isPersistentDelivery()
|
boolean |
isRecoverJmsConnections()
|
boolean |
isRemoteSyncEnabled()
|
void |
onNotification(ServerNotification 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 |
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 |
setHonorQosHeaders(boolean honorQosHeaders)
Sets the honorQosHeaders property, which determines whether
JmsMessageDispatcher should honor incoming message's QoS headers
(JMSPriority, JMSDeliveryMode). |
void |
setJmsSupport(JmsSupport jmsSupport)
|
void |
setMaxRedelivery(int maxRedelivery)
|
void |
setNoLocal(boolean noLocal)
|
void |
setPassword(String password)
|
void |
setPersistentDelivery(boolean persistentDelivery)
|
void |
setRecoverJmsConnections(boolean recover)
|
void |
setRedeliveryHandlerFactory(RedeliveryHandlerFactory redeliveryHandlerFactory)
|
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 static final String JMS
public String username
public String password
| Constructor Detail |
|---|
public JmsConnector()
| Method Detail |
|---|
public String getProtocol()
getProtocol in interface Connector
protected void doInitialise()
throws InitialisationException
doInitialise in class AbstractConnectorInitialisationExceptionprotected ConnectionFactory getDefaultConnectionFactory()
protected void doDispose()
doDispose in class AbstractConnector
protected Connection createConnection()
throws NamingException,
JMSException,
InitialisationException
NamingException
JMSException
InitialisationException
protected void doConnect()
throws ConnectException
doConnect in class AbstractConnectorConnectException
protected void doDisconnect()
throws ConnectException
doDisconnect in class AbstractConnectorConnectException
public MessageAdapter getMessageAdapter(Object message)
throws MessagingException
getMessageAdapter in interface ConnectorgetMessageAdapter in class AbstractConnectorMessagingException
protected Object getReceiverKey(Service service,
InboundEndpoint endpoint)
getReceiverKey in class AbstractConnectorpublic Session getSessionFromTransaction()
public Session getSession(ImmutableEndpoint endpoint)
throws JMSException
JMSException
public Session getSession(boolean transacted,
boolean topic)
throws JMSException
JMSException
protected void doStart()
throws MuleException
doStart in class AbstractConnectorMuleException
protected void doStop()
throws MuleException
doStop in class AbstractConnectorMuleExceptionpublic ReplyToHandler getReplyToHandler()
getReplyToHandler in class AbstractConnectorpublic void onNotification(ServerNotification notification)
onNotification in interface ServerNotificationListenerpublic 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 -
JMSExceptionpublic void closeQuietly(MessageProducer producer)
producer -
public void close(MessageConsumer consumer)
throws JMSException
consumer -
JMSExceptionpublic void closeQuietly(MessageConsumer consumer)
consumer -
public void close(Session session)
throws JMSException
session -
JMSExceptionpublic void closeQuietly(Session session)
session -
public void close(TemporaryQueue tempQueue)
throws JMSException
tempQueue -
JMSExceptionpublic void closeQuietly(TemporaryQueue tempQueue)
tempQueue -
public void close(TemporaryTopic tempTopic)
throws JMSException
tempTopic -
JMSExceptionpublic void closeQuietly(TemporaryTopic tempTopic)
tempTopic - public Connection getConnection()
protected void setConnection(Connection connection)
public int getAcknowledgementMode()
public void setAcknowledgementMode(int acknowledgementMode)
acknowledgementMode - The acknowledgementMode 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 JmsSupport getJmsSupport()
public void setJmsSupport(JmsSupport jmsSupport)
public String getSpecification()
public void setSpecification(String specification)
public void setRecoverJmsConnections(boolean recover)
public boolean isRecoverJmsConnections()
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getClientId()
public void setClientId(String clientId)
public int getMaxRedelivery()
public void setMaxRedelivery(int maxRedelivery)
public boolean isRemoteSyncEnabled()
isRemoteSyncEnabled in interface ConnectorisRemoteSyncEnabled in class AbstractConnectorpublic JmsTopicResolver getTopicResolver()
public void setTopicResolver(JmsTopicResolver topicResolver)
topicResolver - Value to set for property 'topicResolver'.public boolean isEagerConsumer()
true.
eagerConsumerpublic 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,
XaTransactedJmsMessageReceiverpublic boolean isCacheJmsSessions()
public void setCacheJmsSessions(boolean cacheJmsSessions)
public ConnectionFactory getConnectionFactory()
public void setConnectionFactory(ConnectionFactory connectionFactory)
public RedeliveryHandlerFactory getRedeliveryHandlerFactory()
public void setRedeliveryHandlerFactory(RedeliveryHandlerFactory redeliveryHandlerFactory)
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||