public class LSConnectionFactory extends java.lang.Object implements ConnectionFactory
ConnectionFactory interface implementation that can be used used to create a connection
 with a JMS broker through an embedded JMS Extender client connection.| Constructor and Description | 
|---|
LSConnectionFactory()
Creates an  
LSConnectionFactory object that can create new Connection objects. | 
LSConnectionFactory(java.lang.String serverAddress,
                   java.lang.String jmsConnector)
Creates an  
LSConnectionFactory object that can create new Connection objects. | 
LSConnectionFactory(java.lang.String serverAddress,
                   java.lang.String adapterSet,
                   java.lang.String jmsConnector)
Creates an  
LSConnectionFactory object that can create new Connection objects. | 
| Modifier and Type | Method and Description | 
|---|---|
Connection | 
createConnection()
Creates a new  
Connection with an unspecified user identity. | 
Connection | 
createConnection(java.lang.String userName,
                java.lang.String password)
Creates a new  
Connection using the specified user name and password. | 
JMSContext | 
createContext()
Creates a new  
JMSContext with an unspecified user identity and Session.AUTO_ACKNOWLEDGE session mode. | 
JMSContext | 
createContext(int sessionMode)
Creates a new  
JMSContext with an unspecified user identity and the specified session
 mode. | 
JMSContext | 
createContext(java.lang.String userName,
             java.lang.String password)
Creates a new  
JMSContext with the specified user identity, and Session.AUTO_ACKNOWLEDGE session mode. | 
JMSContext | 
createContext(java.lang.String userName,
             java.lang.String password,
             int sessionMode)
Creates a new  
JMSContext with the specified user identity and session mode. | 
java.lang.String | 
getAdapterSet()
Returns the name of the adapter set to use when connecting to the JMS Extender. 
 | 
LSConnectionListener | 
getConnectionListener()
Returns the  
LSConnectionListener implementation to be called during connection setup,
 or null if it has not been set. | 
java.lang.String | 
getJmsConnector()
Returns the name of the JMS connector to use. 
 | 
java.lang.String | 
getServerAddress()
Returns the URL of the JMS Extender to connect to. 
 | 
void | 
setAdapterSet(java.lang.String adapterSet)
Sets the name of the adapter set to use when connecting to the JMS Extender. 
 | 
void | 
setConnectionListener(LSConnectionListener listener)
Sets an  
LSConnectionListener implementation to be called during connection creation. | 
void | 
setJmsConnector(java.lang.String jmsConnector)
Sets the name of the JMS connector to use. 
 | 
void | 
setServerAddress(java.lang.String serverAddress)
Sets the URL of the JMS Extender to connect to. 
 | 
public LSConnectionFactory()
LSConnectionFactory object that can create new Connection objects.
 Uses the default adapter set name JMS, but leaves empty both the JMS connector name
 and the server address (to be specified later).
public LSConnectionFactory(java.lang.String serverAddress,
                           java.lang.String jmsConnector)
LSConnectionFactory object that can create new Connection objects.
 Uses the default adapter set name JMS and the specified JMS connector name and
 server address.
serverAddress - the URL of the JMS Extender to connect tojmsConnector - the name of the JMS connector to usepublic LSConnectionFactory(java.lang.String serverAddress,
                           java.lang.String adapterSet,
                           java.lang.String jmsConnector)
LSConnectionFactory object that can create new Connection objects.
 Uses the specified adapter set name, JMS connector name and server address.
serverAddress - the URL of the JMS Extender to connect toadapterSet - the name of the adapter set to usejmsConnector - the name of the JMS connector to usepublic java.lang.String getServerAddress()
public void setServerAddress(java.lang.String serverAddress)
serverAddress - the URL of the JMS Extenderpublic java.lang.String getAdapterSet()
public void setAdapterSet(java.lang.String adapterSet)
adapterSet - the name of the adapter setpublic java.lang.String getJmsConnector()
public void setJmsConnector(java.lang.String jmsConnector)
jmsConnector - the name of the JMS connectorpublic void setConnectionListener(LSConnectionListener listener)
LSConnectionListener implementation to be called during connection creation.listener - the LSConnectionListener implementationpublic LSConnectionListener getConnectionListener()
LSConnectionListener implementation to be called during connection setup,
 or null if it has not been set.LSConnectionListener implementation or nullpublic Connection createConnection() throws JMSException
Connection with an unspecified user identity.
 The connection is created in stopped mode. No messages will be delivered until the Connection.start() method is explicitly called on the Connection object.
 
If a LSConnectionListener implementation has been set, its events will be called
 during connection creation.
createConnection in interface ConnectionFactoryConnectionJMSException - if the connection creation fails for some reasonpublic Connection createConnection(java.lang.String userName, java.lang.String password) throws JMSException
Connection using the specified user name and password.
 The connection is created in stopped mode. No messages will be delivered until the Connection.start() method is explicitly called on the Connection object.
 
If a LSConnectionListener implementation has been set, its events will be called
 during connection creation.
createConnection in interface ConnectionFactoryuserName - the user's namepassword - the user's passwordConnectionJMSException - if the connection creation fails for some reasonpublic JMSContext createContext()
JMSContext with an unspecified user identity and Session.AUTO_ACKNOWLEDGE session mode.
 The context is created in stopped mode, but will start automatically as soon as the first
 consumer is created. If a LSConnectionListener implementation has been set, its events
 will be called during connection creation.
createContext in interface ConnectionFactoryJMSContextJMSRuntimeException - if the context creation fails for some reasonpublic JMSContext createContext(int sessionMode)
JMSContext with an unspecified user identity and the specified session
 mode.
 The context is created in stopped mode, but will start automatically as soon as the first
 consumer is created. If a LSConnectionListener implementation has been set, its events
 will be called during connection creation.
createContext in interface ConnectionFactorysessionMode - the session mode, one of:
     JMSContextJMSRuntimeException - if the context creation fails for some reasonpublic JMSContext createContext(java.lang.String userName, java.lang.String password)
JMSContext with the specified user identity, and Session.AUTO_ACKNOWLEDGE session mode.
 The context is created in stopped mode, but will start automatically as soon as the first
 consumer is created. If a LSConnectionListener implementation has been set, its events
 will be called during connection creation.
createContext in interface ConnectionFactoryuserName - the user's namepassword - the user's passwordJMSContextJMSRuntimeException - if the context creation fails for some reasonpublic JMSContext createContext(java.lang.String userName, java.lang.String password, int sessionMode)
JMSContext with the specified user identity and session mode.
 The context is created in stopped mode, but will start automatically as soon as the first
 consumer is created. If a LSConnectionListener implementation has been set, its events
 will be called during connection creation.
createContext in interface ConnectionFactoryuserName - the user's namepassword - the user's passwordsessionMode - the session mode, one of:
     Session.AUTO_ACKNOWLEDGE
       Session.CLIENT_ACKNOWLEDGE
       Session.SESSION_TRANSACTED
       Session.DUPS_OK_ACKNOWLEDGE
       LSSession.PRE_ACKNOWLEDGE
       LSSession.INDIVIDUAL_ACKNOWLEDGE
     JMSContextJMSRuntimeException - if the context creation fails for some reason