Package com.sun.messaging
Class BasicConnectionFactory
- java.lang.Object
-
- com.sun.messaging.AdministeredObject
-
- com.sun.messaging.BasicConnectionFactory
-
- All Implemented Interfaces:
jakarta.jms.ConnectionFactory,java.io.Serializable
- Direct Known Subclasses:
ConnectionFactory
public class BasicConnectionFactory extends AdministeredObject implements jakarta.jms.ConnectionFactory
ABasicConnectionFactoryencapsulates Sun MQ specific configuration information for Sun MQConnectionFactoryobjects and is used to create Connections with a Sun MQ Java Message Service (JMS) provider.- See Also:
jakarta.jms.ConnectionFactory,com.sun.messaging.ConnectionConfiguration, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.messaging.AdministeredObject
AO_PROPERTY_TYPE_BOOLEAN, AO_PROPERTY_TYPE_INTEGER, AO_PROPERTY_TYPE_LIST, AO_PROPERTY_TYPE_LONG, AO_PROPERTY_TYPE_PROPERTYOWNER, AO_PROPERTY_TYPE_STRING, cachedConfigurationMap, configuration, configurationLabels, configurationTypes, cr, VERSION
-
-
Constructor Summary
Constructors Modifier Constructor Description BasicConnectionFactory()Constructs a BasicConnectionFactory with the default configuration.protectedBasicConnectionFactory(java.lang.String defaultsBase)Constructs a BasicConnectionFactory with the specified configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.jms.ConnectioncreateConnection()Creates a Connection with the default user identity.jakarta.jms.ConnectioncreateConnection(java.lang.String username, java.lang.String password)Creates a Connection with a specified user identity.jakarta.jms.JMSContextcreateContext()jakarta.jms.JMSContextcreateContext(int sessionMode)jakarta.jms.JMSContextcreateContext(java.lang.String userName, java.lang.String password)jakarta.jms.JMSContextcreateContext(java.lang.String userName, java.lang.String password, int sessionMode)java.lang.StringgetConnectionType()Returns the type of connections created by thisBasicConnectionFactory.protected static com.sun.messaging.jmq.jmsclient.ContainerTypegetContainerType()voidsetConnectionType(java.lang.String type)Sets the type of connections created by thisBasicConnectionFactory.voidsetDefaultConfiguration()Sets the minimumBasicConnectionFactoryconfiguration defaults required to connect to the Sun MQ Message Service.java.lang.StringtoString()Returns a pretty printed version of the provider specific information for this ConnectionFactory object.-
Methods inherited from class com.sun.messaging.AdministeredObject
dump, enumeratePropertyNames, getConfiguration, getCurrentConfiguration, getLabelForGroup, getPropertiesForGroup, getProperty, getPropertyForListValue, getPropertyGroups, getPropertyLabel, getPropertyListOtherName, getPropertyListValues, getPropertyType, getPropertyValueForListValue, getStoredVersion, getVERSION, isPropertyDeprecated, isPropertyHidden, isReadOnly, isStoredVersionCompatible, setProperty, setReadOnly, setStoredVersion
-
-
-
-
Method Detail
-
createConnection
public jakarta.jms.Connection createConnection() throws jakarta.jms.JMSExceptionCreates a Connection with the default user identity. The default user identity is defined by theConnectionFactorypropertiesimqDefaultUsernameandimqDefaultPassword- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Returns:
- a newly created Connection.
- Throws:
jakarta.jms.JMSException- if a JMS error occurs.- See Also:
ConnectionConfiguration.imqDefaultUsername,ConnectionConfiguration.imqDefaultPassword
-
createConnection
public jakarta.jms.Connection createConnection(java.lang.String username, java.lang.String password) throws jakarta.jms.JMSExceptionCreates a Connection with a specified user identity.- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Parameters:
username- the caller's user namepassword- the caller's password- Returns:
- a newly created connection.
- Throws:
jakarta.jms.JMSException- if a JMS error occurs.
-
createContext
public jakarta.jms.JMSContext createContext()
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(java.lang.String userName, java.lang.String password)- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(java.lang.String userName, java.lang.String password, int sessionMode)- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(int sessionMode)
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
getContainerType
protected static com.sun.messaging.jmq.jmsclient.ContainerType getContainerType()
-
setConnectionType
public final void setConnectionType(java.lang.String type)
Sets the type of connections created by thisBasicConnectionFactory.- Parameters:
type- The type of connections created by thisBasicConnectionFactory.
-
getConnectionType
public final java.lang.String getConnectionType()
Returns the type of connections created by thisBasicConnectionFactory.- Returns:
- The type of connections created by this
BasicConnectionFactory.
-
toString
public java.lang.String toString()
Returns a pretty printed version of the provider specific information for this ConnectionFactory object.- Overrides:
toStringin classAdministeredObject- Returns:
- the pretty printed string.
-
setDefaultConfiguration
public void setDefaultConfiguration()
Sets the minimumBasicConnectionFactoryconfiguration defaults required to connect to the Sun MQ Message Service.- Specified by:
setDefaultConfigurationin classAdministeredObject
-
-