public abstract class AbstractConnectionFactory extends AdministeredObject
jakarta.jms.ConnectionFactory
interface.Modifier and Type | Field and Description |
---|---|
private String |
cnxJMXBeanBaseName |
(package private) static String |
dfltLogin
Default login name for connection, default value is "anonymous".
|
(package private) static String |
dfltPassword
Default login password for connection, default value is "anonymous".
|
(package private) static String |
dfltRootLogin
Default administrator login name for connection, default value is "root".
|
(package private) static String |
dfltRootPassword
Default administrator login password for connection, default value is
"root".
|
(package private) static String |
dfltServerHost
Default server's hostname for connection, default value is "localhost".
|
(package private) static int |
dfltServerPort
Default server's port for connection, default value is 16010.
|
protected Identity |
identity
Authentication identity.
|
protected String |
identityClassName |
private boolean |
isSetIdentityClassName |
private static Logger |
logger |
protected FactoryParameters |
params
Object containing the factory's parameters.
|
protected String |
reliableClass
Reliable class name, for example use by ssl.
|
private static long |
serialVersionUID
define serialVersionUID for interoperability, fix with 5.15.0 value
|
Constructor and Description |
---|
AbstractConnectionFactory()
Constructs an empty
ConnectionFactory . |
AbstractConnectionFactory(String url)
Constructs a
ConnectionFactory dedicated to a given server. |
AbstractConnectionFactory(String host,
int port)
Constructs a
ConnectionFactory dedicated to a given server. |
Modifier and Type | Method and Description |
---|---|
jakarta.jms.Connection |
createConnection()
API method, creates a connection with the default user identity.
|
jakarta.jms.Connection |
createConnection(String name,
String password)
API method, creates a connection with the specified user identity.
|
jakarta.jms.JMSContext |
createContext()
JMS2.0 API method.
|
jakarta.jms.JMSContext |
createContext(int mode)
JMS2.0 API method.
|
jakarta.jms.JMSContext |
createContext(String userName,
String password)
JMS2.0 API method.
|
JMSContext |
createContext(String userName,
String password,
int mode)
JMS2.0 API method.
|
jakarta.jms.QueueConnection |
createQueueConnection()
API method, creates a queue connection with the default user identity.
|
jakarta.jms.QueueConnection |
createQueueConnection(String name,
String password)
API method, creates a queue connection with the specified user identity.
|
protected abstract RequestChannel |
createRequestChannel(FactoryParameters params,
Identity identity,
String reliableClass)
Creates the
RequestChannel object specific to the protocol used. |
jakarta.jms.TopicConnection |
createTopicConnection()
API method, creates a topic connection with the default user identity.
|
jakarta.jms.TopicConnection |
createTopicConnection(String name,
String password)
API method, creates a topic connection with the specified user identity.
|
jakarta.jms.XAConnection |
createXAConnection()
API method, creates an XA connection with the default user identity.
|
jakarta.jms.XAConnection |
createXAConnection(String name,
String password)
API method, creates an XA connection with the specified user identity.
|
jakarta.jms.XAJMSContext |
createXAContext()
JMS2.0 API method.
|
jakarta.jms.XAJMSContext |
createXAContext(String userName,
String password)
JMS2.0 API method.
|
jakarta.jms.XAQueueConnection |
createXAQueueConnection()
API method, creates an XA queue connection with the default user identity.
|
jakarta.jms.XAQueueConnection |
createXAQueueConnection(String name,
String password)
API method, creates an XA queue connection with the specified user identity.
|
jakarta.jms.XATopicConnection |
createXATopicConnection()
API method, creates an XA topic connection with the default user identity.
|
jakarta.jms.XATopicConnection |
createXATopicConnection(String name,
String password)
API method, creates an XA topic connection with the specified user identity.
|
void |
fromReference(Reference ref)
Restores the administered object from a naming reference.
|
void |
fromReference(Reference ref,
String prefix)
Restores the administered object from a clustered naming reference.
|
static String |
getDefaultLogin()
Returns default login name for connection.
|
static String |
getDefaultPassword()
Returns the default login password for connection.
|
static String |
getDefaultRootLogin()
Returns default administrator login name for connection.
|
static String |
getDefaultRootPassword()
Returns the default administrator login password for connection.
|
static String |
getDefaultServerHost()
Returns default server's hostname for connection.
|
static int |
getDefaultServerPort()
Returns default server's port for connection.
|
FactoryParameters |
getParameters()
Returns the factory's configuration parameters.
|
protected void |
initIdentity(String user,
String passwd)
initialize the user identity.
|
void |
setCnxJMXBeanBaseName(String base) |
void |
setIdentityClassName(String identityClassName)
set indentity class name
|
void |
setReliableClass(String reliableClass) |
void |
toReference(Reference ref)
Sets the naming reference of an administered object.
|
void |
toReference(Reference ref,
String prefix)
Sets the clustered naming reference of a connection factory.
|
getReference
private static final long serialVersionUID
private static Logger logger
protected FactoryParameters params
protected String reliableClass
protected Identity identity
protected String identityClassName
private boolean isSetIdentityClassName
static final String dfltServerHost
static final int dfltServerPort
static final String dfltRootLogin
static final String dfltRootPassword
static final String dfltLogin
static final String dfltPassword
private String cnxJMXBeanBaseName
public AbstractConnectionFactory(String host, int port)
ConnectionFactory
dedicated to a given server.host
- Name or IP address of the server's host.port
- Server's listening port.public AbstractConnectionFactory(String url)
ConnectionFactory
dedicated to a given server.url
- joram ha url.public AbstractConnectionFactory()
ConnectionFactory
.
Needed by ObjectFactory.public void setIdentityClassName(String identityClassName)
identityClassName
- default Identity.SIMPLE_IDENTITY_CLASS (user/passwd).protected void initIdentity(String user, String passwd) throws jakarta.jms.JMSException
user
- user namepasswd
- user passwordjakarta.jms.JMSException
public void setReliableClass(String reliableClass)
public static String getDefaultServerHost()
public static int getDefaultServerPort()
public static String getDefaultRootLogin()
public static String getDefaultRootPassword()
public static String getDefaultLogin()
public static String getDefaultPassword()
public FactoryParameters getParameters()
public void setCnxJMXBeanBaseName(String base)
protected abstract RequestChannel createRequestChannel(FactoryParameters params, Identity identity, String reliableClass) throws jakarta.jms.JMSException
RequestChannel
object specific to the protocol used.params
- Connection configuration parameters.identity
- Client's identity.reliableClass
- The protocol specific class.RequestChannel
object specific to the protocol used.jakarta.jms.JMSException
- A problem occurs during the connection.public jakarta.jms.Connection createConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
ConnectionFactory.createConnection()
public jakarta.jms.Connection createConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
ConnectionFactory.createConnection(String, String)
public jakarta.jms.QueueConnection createQueueConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
QueueConnectionFactory.createQueueConnection()
public jakarta.jms.QueueConnection createQueueConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
QueueConnectionFactory.createQueueConnection(String, String)
public jakarta.jms.TopicConnection createTopicConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
TopicConnectionFactory.createTopicConnection()
public jakarta.jms.TopicConnection createTopicConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
TopicConnectionFactory.createTopicConnection(String, String)
public jakarta.jms.XAConnection createXAConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XAConnectionFactory.createXAConnection()
public jakarta.jms.XAConnection createXAConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XAConnectionFactory.createXAConnection(String, String)
public jakarta.jms.XAQueueConnection createXAQueueConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XAQueueConnectionFactory.createXAQueueConnection()
public jakarta.jms.XAQueueConnection createXAQueueConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XAQueueConnectionFactory.createXAQueueConnection(String, String)
public jakarta.jms.XATopicConnection createXATopicConnection() throws jakarta.jms.JMSException
jakarta.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XATopicConnectionFactory.createXATopicConnection()
public jakarta.jms.XATopicConnection createXATopicConnection(String name, String password) throws jakarta.jms.JMSException
name
- the caller's user name.password
- the caller's password.jakarta.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.jakarta.jms.JMSException
XATopicConnectionFactory.createXATopicConnection(String, String)
public final void toReference(Reference ref) throws NamingException
toReference
in class AdministeredObject
NamingException
public void toReference(Reference ref, String prefix)
public final void fromReference(Reference ref) throws NamingException
fromReference
in class AdministeredObject
NamingException
public void fromReference(Reference ref, String prefix)
public jakarta.jms.JMSContext createContext()
public jakarta.jms.JMSContext createContext(int mode)
public jakarta.jms.JMSContext createContext(String userName, String password)
public JMSContext createContext(String userName, String password, int mode)
public jakarta.jms.XAJMSContext createXAContext()
Copyright © 2022 ScalAgent D.T.. All rights reserved.