org.mule.providers.jms
Class JmsConnector

java.lang.Object
  extended byorg.mule.providers.AbstractConnector
      extended byorg.mule.providers.AbstractServiceEnabledConnector
          extended byorg.mule.providers.jms.JmsConnector
All Implemented Interfaces:
Disposable, java.beans.ExceptionListener, Initialisable, Startable, Stoppable, UMOConnector

public class JmsConnector
extends AbstractServiceEnabledConnector

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, loacal transactions

Version:
$Revision: 1.3 $
Author:
Ross Mason, Guillaume Nodet

Field Summary
static java.lang.String JMS_SELECTOR_PROPERTY
           
static java.lang.String JMS_SPECIFICATION_102B
           
static java.lang.String JMS_SPECIFICATION_11
           
 java.lang.String password
           
 java.lang.String username
           
 
Fields inherited from class org.mule.providers.AbstractServiceEnabledConnector
serviceDescriptor, serviceOverrides
 
Fields inherited from class org.mule.providers.AbstractConnector
DEFAULT_RETRY_COUNT, DEFAULT_RETRY_FREQUENCY, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, exceptionStrategy, initialised, logger, name, receivers, started
 
Constructor Summary
JmsConnector()
           
 
Method Summary
protected  Connection createConnection()
           
protected  ConnectionFactory createConnectionFactory()
           
protected  void disposeConnector()
          Template method to perform any work when destroying the connectoe
 void doInitialise()
           
 int getAcknowledgementMode()
           
 java.lang.String getClientId()
           
 Connection getConnection()
           
 ConnectionFactory getConnectionFactory()
           
 java.lang.String getConnectionFactoryJndiName()
           
 JmsSupport getJmsSupport()
           
 javax.naming.Context getJndiContext()
           
 java.lang.String getJndiInitialFactory()
           
 java.lang.String getJndiProviderUrl()
           
 java.lang.String getPassword()
           
 java.lang.String getProtocol()
           
 java.util.Map getProviderProperties()
           
protected  java.lang.Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
           
 ReplyToHandler getReplyToHandler()
           
 Session getSession(boolean transacted)
           
 java.lang.Object getSession(UMOEndpoint endpoint)
           
 java.lang.Object getSessionFactory(UMOEndpoint endpoint)
           
 java.lang.String getSpecification()
           
 java.lang.String getUsername()
           
protected  void initJndiContext()
           
 boolean isDurable()
           
 boolean isForceJndiDestinations()
           
 boolean isJndiDestinations()
           
 boolean isNoLocal()
           
 boolean isPersistentDelivery()
           
 void setAcknowledgementMode(int acknowledgementMode)
           
 void setClientId(java.lang.String clientId)
           
protected  void setConnection(Connection connection)
           
 void setConnectionFactory(ConnectionFactory connectionFactory)
           
 void setConnectionFactoryJndiName(java.lang.String connectionFactoryJndiName)
           
 void setDurable(boolean durable)
           
 void setForceJndiDestinations(boolean forceJndiDestinations)
           
 void setJmsSupport(JmsSupport jmsSupport)
           
 void setJndiContext(javax.naming.Context jndiContext)
           
 void setJndiDestinations(boolean jndiDestinations)
           
 void setJndiInitialFactory(java.lang.String jndiInitialFactory)
           
 void setJndiProviderUrl(java.lang.String jndiProviderUrl)
           
 void setNoLocal(boolean noLocal)
           
 void setPassword(java.lang.String password)
           
 void setPersistentDelivery(boolean persistentDelivery)
           
 void setProviderProperties(java.util.Map endpointProperties)
           
 void setSpecification(java.lang.String specification)
           
 void setUsername(java.lang.String username)
           
 void startConnector()
          Template method to perform any work when starting the connectoe
 void stopConnector()
          Template method to perform any work when stopping the connectoe
 
Methods inherited from class org.mule.providers.AbstractServiceEnabledConnector
createReceiver, getMessageAdapter, getServiceDescriptor, getServiceOverrides, initFromServiceDescriptor, initialiseFromUrl, setServiceOverrides
 
Methods inherited from class org.mule.providers.AbstractConnector
createDispatcher, destroyReceiver, dispose, exceptionThrown, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcher, getDispatcherFactory, getDispatcherThreadingProfile, getExceptionStrategy, getName, getReceiverThreadingProfile, getRetryCount, getRetryFrequency, handleException, initialise, isDisposed, isDisposeDispatcherOnCompletion, isStarted, registerListener, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setDisposeDispatcherOnCompletion, setExceptionStrategy, setName, setReceiverThreadingProfile, setRetryCount, setRetryFrequency, start, stop, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JMS_SELECTOR_PROPERTY

public static final java.lang.String JMS_SELECTOR_PROPERTY
See Also:
Constant Field Values

JMS_SPECIFICATION_102B

public static final java.lang.String JMS_SPECIFICATION_102B
See Also:
Constant Field Values

JMS_SPECIFICATION_11

public static final java.lang.String JMS_SPECIFICATION_11
See Also:
Constant Field Values

username

public java.lang.String username

password

public java.lang.String password
Constructor Detail

JmsConnector

public JmsConnector()
Method Detail

doInitialise

public void doInitialise()
                  throws InitialisationException
Overrides:
doInitialise in class AbstractServiceEnabledConnector
Throws:
InitialisationException

initJndiContext

protected void initJndiContext()
                        throws javax.naming.NamingException
Throws:
javax.naming.NamingException

setConnection

protected void setConnection(Connection connection)

createConnectionFactory

protected ConnectionFactory createConnectionFactory()
                                             throws InitialisationException,
                                                    javax.naming.NamingException
Throws:
InitialisationException
javax.naming.NamingException

createConnection

protected Connection createConnection()
                               throws javax.naming.NamingException,
                                      JMSException,
                                      InitialisationException
Throws:
javax.naming.NamingException
JMSException
InitialisationException

getReceiverKey

protected java.lang.Object getReceiverKey(UMOComponent component,
                                          UMOEndpoint endpoint)
Overrides:
getReceiverKey in class AbstractConnector

getSessionFactory

public java.lang.Object getSessionFactory(UMOEndpoint endpoint)

getSession

public Session getSession(boolean transacted)
                   throws JMSException
Throws:
JMSException

stopConnector

public void stopConnector()
                   throws UMOException
Description copied from class: AbstractConnector
Template method to perform any work when stopping the connectoe

Overrides:
stopConnector in class AbstractConnector
Throws:
UMOException - if the method fails

startConnector

public void startConnector()
                    throws UMOException
Description copied from class: AbstractConnector
Template method to perform any work when starting the connectoe

Overrides:
startConnector in class AbstractConnector
Throws:
UMOException - if the method fails

getProtocol

public java.lang.String getProtocol()
Specified by:
getProtocol in interface UMOConnector
Specified by:
getProtocol in class AbstractConnector

disposeConnector

protected void disposeConnector()
                         throws UMOException
Description copied from class: AbstractConnector
Template method to perform any work when destroying the connectoe

Overrides:
disposeConnector in class AbstractConnector
Throws:
UMOException - if the method fails

getAcknowledgementMode

public int getAcknowledgementMode()
Returns:
Returns the acknowledgeMode.

setAcknowledgementMode

public void setAcknowledgementMode(int acknowledgementMode)
Parameters:
acknowledgementMode - The acknowledgementMode to set.

getConnectionFactoryJndiName

public java.lang.String getConnectionFactoryJndiName()
Returns:
Returns the connectionFactoryJndiName.

setConnectionFactoryJndiName

public void setConnectionFactoryJndiName(java.lang.String connectionFactoryJndiName)
Parameters:
connectionFactoryJndiName - The connectionFactoryJndiName to set.

isDurable

public boolean isDurable()
Returns:
Returns the durable.

setDurable

public void setDurable(boolean durable)
Parameters:
durable - The durable to set.

isNoLocal

public boolean isNoLocal()
Returns:
Returns the noLocal.

setNoLocal

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

isPersistentDelivery

public boolean isPersistentDelivery()
Returns:
Returns the persistentDelivery.

setPersistentDelivery

public void setPersistentDelivery(boolean persistentDelivery)
Parameters:
persistentDelivery - The persistentDelivery to set.

getProviderProperties

public java.util.Map getProviderProperties()
Returns:
Returns the endpointProperties.

setProviderProperties

public void setProviderProperties(java.util.Map endpointProperties)
Parameters:
endpointProperties - The endpointProperties to set.

getJndiInitialFactory

public java.lang.String getJndiInitialFactory()

setJndiInitialFactory

public void setJndiInitialFactory(java.lang.String jndiInitialFactory)

getJndiProviderUrl

public java.lang.String getJndiProviderUrl()

setJndiProviderUrl

public void setJndiProviderUrl(java.lang.String jndiProviderUrl)

getSession

public java.lang.Object getSession(UMOEndpoint endpoint)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getConnectionFactory

public ConnectionFactory getConnectionFactory()

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)

getJmsSupport

public JmsSupport getJmsSupport()

setJmsSupport

public void setJmsSupport(JmsSupport jmsSupport)

getSpecification

public java.lang.String getSpecification()

setSpecification

public void setSpecification(java.lang.String specification)

isJndiDestinations

public boolean isJndiDestinations()

setJndiDestinations

public void setJndiDestinations(boolean jndiDestinations)

isForceJndiDestinations

public boolean isForceJndiDestinations()

setForceJndiDestinations

public void setForceJndiDestinations(boolean forceJndiDestinations)

getJndiContext

public javax.naming.Context getJndiContext()

setJndiContext

public void setJndiContext(javax.naming.Context jndiContext)

getReplyToHandler

public ReplyToHandler getReplyToHandler()
Overrides:
getReplyToHandler in class AbstractConnector

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String password)

getConnection

public Connection getConnection()
Returns:
Returns the connection.

getClientId

public java.lang.String getClientId()

setClientId

public void setClientId(java.lang.String clientId)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.