public abstract class AbstractConnectionFactory extends AdministeredObject
javax.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 org.objectweb.util.monolog.api.Logger |
logger |
protected FactoryParameters |
params
Object containing the factory's parameters.
|
protected String |
reliableClass
Reliable class name, for example use by ssl.
|
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 |
---|---|
javax.jms.Connection |
createConnection()
API method, creates a connection with the default user identity.
|
javax.jms.Connection |
createConnection(String name,
String password)
API method, creates a connection with the specified user identity.
|
javax.jms.JMSContext |
createContext()
JMS2.0 API method.
|
javax.jms.JMSContext |
createContext(int mode)
JMS2.0 API method.
|
javax.jms.JMSContext |
createContext(String userName,
String password)
JMS2.0 API method.
|
JMSContext |
createContext(String userName,
String password,
int mode)
JMS2.0 API method.
|
javax.jms.QueueConnection |
createQueueConnection()
API method, creates a queue connection with the default user identity.
|
javax.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. |
javax.jms.TopicConnection |
createTopicConnection()
API method, creates a topic connection with the default user identity.
|
javax.jms.TopicConnection |
createTopicConnection(String name,
String password)
API method, creates a topic connection with the specified user identity.
|
javax.jms.XAConnection |
createXAConnection()
API method, creates an XA connection with the default user identity.
|
javax.jms.XAConnection |
createXAConnection(String name,
String password)
API method, creates an XA connection with the specified user identity.
|
javax.jms.XAJMSContext |
createXAContext()
JMS2.0 API method.
|
javax.jms.XAJMSContext |
createXAContext(String userName,
String password)
JMS2.0 API method.
|
javax.jms.XAQueueConnection |
createXAQueueConnection()
API method, creates an XA queue connection with the default user identity.
|
javax.jms.XAQueueConnection |
createXAQueueConnection(String name,
String password)
API method, creates an XA queue connection with the specified user identity.
|
javax.jms.XATopicConnection |
createXATopicConnection()
API method, creates an XA topic connection with the default user identity.
|
javax.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 org.objectweb.util.monolog.api.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 javax.jms.JMSException
user
- user namepasswd
- user passwordjavax.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 javax.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.javax.jms.JMSException
- A problem occurs during the connection.public javax.jms.Connection createConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
ConnectionFactory.createConnection()
public javax.jms.Connection createConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
ConnectionFactory.createConnection(String, String)
public javax.jms.QueueConnection createQueueConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
QueueConnectionFactory.createQueueConnection()
public javax.jms.QueueConnection createQueueConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
QueueConnectionFactory.createQueueConnection(String, String)
public javax.jms.TopicConnection createTopicConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
TopicConnectionFactory.createTopicConnection()
public javax.jms.TopicConnection createTopicConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
TopicConnectionFactory.createTopicConnection(String, String)
public javax.jms.XAConnection createXAConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
XAConnectionFactory.createXAConnection()
public javax.jms.XAConnection createXAConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
XAConnectionFactory.createXAConnection(String, String)
public javax.jms.XAQueueConnection createXAQueueConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
XAQueueConnectionFactory.createXAQueueConnection()
public javax.jms.XAQueueConnection createXAQueueConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
XAQueueConnectionFactory.createXAQueueConnection(String, String)
public javax.jms.XATopicConnection createXATopicConnection() throws javax.jms.JMSException
javax.jms.JMSSecurityException
- If the default identification is incorrect.IllegalStateException
- If the server is not listening.javax.jms.JMSException
XATopicConnectionFactory.createXATopicConnection()
public javax.jms.XATopicConnection createXATopicConnection(String name, String password) throws javax.jms.JMSException
name
- the caller's user name.password
- the caller's password.javax.jms.JMSSecurityException
- If the user identification is incorrect.IllegalStateException
- If the server is not listening.javax.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 javax.jms.JMSContext createContext()
public javax.jms.JMSContext createContext(int mode)
public javax.jms.JMSContext createContext(String userName, String password)
public JMSContext createContext(String userName, String password, int mode)
public javax.jms.XAJMSContext createXAContext()
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.