Class TibjmsConnectionFactory
- java.lang.Object
-
- com.tibco.tibjms.TibjmsxCFImpl
-
- com.tibco.tibjms.TibjmsConnectionFactory
-
- All Implemented Interfaces:
com.tibco.tibjms.TibjmsXMLConst
,java.io.Externalizable
,java.io.Serializable
,java.lang.Cloneable
,ConnectionFactory
,javax.naming.Referenceable
- Direct Known Subclasses:
TibjmsQueueConnectionFactory
,TibjmsTopicConnectionFactory
public class TibjmsConnectionFactory extends com.tibco.tibjms.TibjmsxCFImpl implements ConnectionFactory, java.io.Externalizable, javax.naming.Referenceable, java.lang.Cloneable
Implementation of javax.jms.ConnectionFactory.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.tibco.tibjms.TibjmsxCFImpl
_clientID, _properties, _url, _wasCreatedByUfo
-
Fields inherited from interface com.tibco.tibjms.TibjmsXMLConst
TIBJMS_LDAP_ADMINOBJ, TIBJMS_LDAP_CN, TIBJMS_LDAP_OBJCLASS, TIBJMS_LDAP_TOP, TIBJMS_LDAP_XMLDATA, TIBJMS_XML_ADMINOBJ, TIBJMS_XML_AUTHONLY, TIBJMS_XML_AUTHORITIES, TIBJMS_XML_B64DATA, TIBJMS_XML_CERT, TIBJMS_XML_CERTS, TIBJMS_XML_CIDENTITY, TIBJMS_XML_CIPHERS, TIBJMS_XML_CLIENTID, TIBJMS_XML_CONFACT, TIBJMS_XML_CONNATTEMPTS, TIBJMS_XML_CONNATTEMPTTIMEOUT, TIBJMS_XML_CONNDELAY, TIBJMS_XML_DEBUG_TRACE, TIBJMS_XML_DESTTYPE, TIBJMS_XML_DISABLED, TIBJMS_XML_DTDURL, TIBJMS_XML_ENABLED, TIBJMS_XML_ENCODING, TIBJMS_XML_EXPECTHNAME, TIBJMS_XML_FILE, TIBJMS_XML_GENERIC, TIBJMS_XML_GENPARAMS, TIBJMS_XML_ISSUER, TIBJMS_XML_METRIC, TIBJMS_XML_MULTICAST, TIBJMS_XML_MULTICAST_DAEMON, TIBJMS_XML_NAME, TIBJMS_XML_PARAMETER, TIBJMS_XML_PASSWORD, TIBJMS_XML_PKEY, TIBJMS_XML_QUEUE, TIBJMS_XML_RECONNATTEMPTS, TIBJMS_XML_RECONNATTEMPTTIMEOUT, TIBJMS_XML_RECONNDELAY, TIBJMS_XML_SECPARAMS, TIBJMS_XML_SSLPARAMS, TIBJMS_XML_TOPIC, TIBJMS_XML_TRACE, TIBJMS_XML_TRUSTED, TIBJMS_XML_URL, TIBJMS_XML_USERNAME, TIBJMS_XML_VALUE, TIBJMS_XML_VENDOR, TIBJMS_XML_VERIFYHNAME, TIBJMS_XML_VERIFYHOST, TIBJMS_XML_XA
-
-
Constructor Summary
Constructors Constructor Description TibjmsConnectionFactory()
Create an empty connection factory.TibjmsConnectionFactory(java.lang.String serverUrl)
Create a connection factory with the given server URL.TibjmsConnectionFactory(java.lang.String serverUrl, java.lang.String clientId)
Create a connection factory with the given server URL and client id.TibjmsConnectionFactory(java.lang.String serverUrl, java.lang.String clientId, java.util.Map properties)
Create a connection factory with the given server URL, client id, and properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
Connection
createConnection()
Creates a connection with the default user identity.Connection
createConnection(java.lang.String userName, java.lang.String password)
Creates a connection with the specified user identity.JMSContext
createContext()
Creates a JMSContext with the default user identity and an unspecified sessionMode.JMSContext
createContext(int sessionMode)
Creates a JMSContext with the default user identity and the specified session mode.JMSContext
createContext(java.lang.String userName, java.lang.String password)
Creates a JMSContext with the specified user identity and an unspecified sessionMode.JMSContext
createContext(java.lang.String userName, java.lang.String password, int sessionMode)
Creates a JMSContext with the specified user identity and the specified session mode.java.lang.String
getSSLProxyHost()
Get the TLS proxy host from this connection factory.java.lang.String
getSSLProxyPassword()
Get the TLS proxy password from a connection factory.int
getSSLProxyPort()
Get the TLS proxy port from this connection factory.java.lang.String
getSSLProxyUser()
Get the TLS proxy username from a connection factory.void
readExternal(java.io.ObjectInput in)
void
setClientID(java.lang.String clientID)
void
setConnAttemptCount(int attempts)
void
setConnAttemptDelay(int delay)
void
setConnAttemptTimeout(int timeout)
Set the Connect Attempt timeout for a given connection.void
setMetric(int metric)
This sets the metric that will be used to select an ems server during load balancing switchover.void
setMulticastDaemon(java.lang.String port)
Deprecated.As of release 8.3void
setMulticastEnabled(boolean enabled)
Deprecated.As of release 8.3void
setReconnAttemptCount(int attempts)
void
setReconnAttemptDelay(int delay)
void
setReconnAttemptTimeout(int timeout)
Set the Reconnect Attempt timeout for a given connection Note: This timeout is per url and per reconnect_attempt.void
setServerUrl(java.lang.String serverUrl)
Connections created by this connection factory will connect to the server at the given URLvoid
setSSLAuthOnly(java.lang.Boolean authOnly)
Set client connections to use TLS only during initial connection authentication.void
setSSLCipherSuites(java.lang.String suites)
Set cipher suites to be used by SSL connections.void
setSSLDebugTrace(java.lang.Boolean debugTrace)
Enables debug tracing.void
setSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost)
Set if the host certificate should be verified by the client.void
setSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName)
Set if the name in the host certificate should be verified or not.void
setSSLExpectedHostName(java.lang.String expectedHostName)
Set the name which is expected to be set in the host certificate.void
setSSLIdentity(byte[] identity)
The client's digital certificate.void
setSSLIdentity(java.lang.String sslIdentity)
The client's digital certificate.void
setSSLIdentityEncoding(java.lang.String sslIdentityEncoding)
The encoding of the client identity specified in the setSSLIdentity() method.void
setSSLIssuerCertificate(byte[] certificate, java.lang.String encoding)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these.void
setSSLIssuerCertificate(java.lang.String certificate)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these.void
setSSLIssuerCertificate(java.lang.String certificate, java.lang.String encoding)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these.void
setSSLPassword(java.lang.String sslPassword)
Set the private key password for TLS.void
setSSLPrivateKey(byte[] sslPrivateKey)
Set the private key corresponding to the identity certificate.void
setSSLPrivateKey(java.lang.String sslPrivateKey)
Set the private key corresponding to the identity certificate.void
setSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding)
Set the private key corresponding to the identity certificate.void
setSSLProxy(java.lang.String host, int port)
Set the connection factory's parameters for connecting through a TLS proxy.void
setSSLProxyAuth(java.lang.String username, java.lang.String password)
Set a connection factory's username and password for connecting through a TLS proxy.void
setSSLTrace(java.lang.Boolean trace)
void
setSSLTrustedCertificate(byte[] certificate, java.lang.String trustedEncoding)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these.void
setSSLTrustedCertificate(java.lang.String certificate)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these.void
setSSLTrustedCertificate(java.lang.String certificate, java.lang.String trustedEncoding)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these.void
setSSLVendor(java.lang.String vendor)
Set the TLS vendor to the specified vendor.void
setUserName(java.lang.String username)
void
setUserPassword(java.lang.String password)
void
writeExternal(java.io.ObjectOutput out)
-
Methods inherited from class com.tibco.tibjms.TibjmsxCFImpl
_getCurrentUrl, buildXML, getClientID, getCurrentUrl, getMetric, getProperties, getReference, getUrl, toString
-
-
-
-
Constructor Detail
-
TibjmsConnectionFactory
public TibjmsConnectionFactory()
Create an empty connection factory. This call does not attempt to access the repository. Equivalent toTibjmsConnectionFactory(null, null, null)
.- See Also:
TibjmsContext
-
TibjmsConnectionFactory
public TibjmsConnectionFactory(java.lang.String serverUrl)
Create a connection factory with the given server URL. Equivalent toTibjmsConnectionFactory(serverUrl, null, null)
.- Parameters:
serverUrl
- Connections created by this connection factory will connect to the server at this URL.
-
TibjmsConnectionFactory
public TibjmsConnectionFactory(java.lang.String serverUrl, java.lang.String clientId)
Create a connection factory with the given server URL and client id. Equivalent toTibjmsConnectionFactory(serverUrl, clientId, null)
.- Parameters:
serverUrl
- Connections created by this connection factory will connect to the server at this URL.clientId
-
-
TibjmsConnectionFactory
public TibjmsConnectionFactory(java.lang.String serverUrl, java.lang.String clientId, java.util.Map properties)
Create a connection factory with the given server URL, client id, and properties.- Parameters:
serverUrl
- Connections created by this connection factory will connect to the server at this URL.clientId
-properties
-
-
-
Method Detail
-
createConnection
public Connection createConnection() throws JMSException
Description copied from interface:ConnectionFactory
Creates a connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Specified by:
createConnection
in interfaceConnectionFactory
- Returns:
- a newly created connection
- Throws:
JMSException
- if the Jakarta Messaging provider fails to create the connection due to some internal error.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createConnection
public Connection createConnection(java.lang.String userName, java.lang.String password) throws JMSException
Description copied from interface:ConnectionFactory
Creates a connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until theConnection.start
method is explicitly called.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created connection
- Throws:
JMSException
- if the Jakarta Messaging provider fails to create the connection due to some internal error.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
-
createContext
public JMSContext createContext()
Description copied from interface:ConnectionFactory
Creates a JMSContext with the default user identity and an unspecified sessionMode.A connection and session are created for use by the new JMSContext. The connection is created in stopped mode but will be automatically started when a JMSConsumer is created.
The behaviour of the session that is created depends on whether this method is called in a Java SE environment, in the Jakarta EE application client container, or in the Jakarta EE web or EJB container. If this method is called in the Jakarta EE web or EJB container then the behaviour of the session also depends on whether or not there is an active JTA transaction in progress.
In a Java SE environment or in the Jakarta EE application client container:
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
JMSContext.AUTO_ACKNOWLEDGE
For a definition of the meaning of this acknowledgement mode see the link below.
In a Jakarta EE web or EJB container, when there is an active JTA transaction in progress:
- The session will participate in the JTA transaction and will be committed or rolled back when that transaction is
committed or rolled back, not by calling the
JMSContext
'scommit
orrollback
methods.
In the Jakarta EE web or EJB container, when there is no active JTA transaction in progress:
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
JMSContext.AUTO_ACKNOWLEDGE
For a definition of the meaning of this acknowledgement mode see the link below.
- Specified by:
createContext
in interfaceConnectionFactory
- Returns:
- a newly created JMSContext
- See Also:
JMSContext.AUTO_ACKNOWLEDGE
,ConnectionFactory.createContext(int)
,ConnectionFactory.createContext(java.lang.String, java.lang.String)
,ConnectionFactory.createContext(java.lang.String, java.lang.String, int)
,JMSContext.createContext(int)
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
-
createContext
public JMSContext createContext(int sessionMode)
Description copied from interface:ConnectionFactory
Creates a JMSContext with the default user identity and the specified session mode.A connection and session are created for use by the new JMSContext. The JMSContext is created in stopped mode but will be automatically started when a JMSConsumer is created.
The effect of setting the
sessionMode
argument depends on whether this method is called in a Java SE environment, in the Jakarta EE application client container, or in the Jakarta EE web or EJB container. If this method is called in the Jakarta EE web or EJB container then the effect of setting thesessionMode
argument also depends on whether or not there is an active JTA transaction in progress.In a Java SE environment or in the Jakarta EE application client container:
- If
sessionMode
is set toJMSContext.SESSION_TRANSACTED
then the session will use a local transaction which may subsequently be committed or rolled back by calling theJMSContext
'scommit
orrollback
methods. - If
sessionMode
is set to any ofJMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
orJMSContext.DUPS_OK_ACKNOWLEDGE
. then the session will be non-transacted and messages received by this session will be acknowledged according to the value ofsessionMode
. For a definition of the meaning of these acknowledgement modes see the links below.
In a Jakarta EE web or EJB container, when there is an active JTA transaction in progress:
- The argument
sessionMode
is ignored. The session will participate in the JTA transaction and will be committed or rolled back when that transaction is committed or rolled back, not by calling theJMSContext
'scommit
orrollback
methods. Since the argument is ignored, developers are recommended to usecreateContext()
instead of this method.
In the Jakarta EE web or EJB container, when there is no active JTA transaction in progress:
- The argument
acknowledgeMode
must be set to either ofJMSContext.AUTO_ACKNOWLEDGE
orJMSContext.DUPS_OK_ACKNOWLEDGE
. The session will be non-transacted and messages received by this session will be acknowledged automatically according to the value ofacknowledgeMode
. For a definition of the meaning of these acknowledgement modes see the links below. The valuesJMSContext.SESSION_TRANSACTED
andJMSContext.CLIENT_ACKNOWLEDGE
may not be used.
- Specified by:
createContext
in interfaceConnectionFactory
- Parameters:
sessionMode
- indicates which of four possible session modes will be used.- If this method is called in a Java SE environment or in the Jakarta EE application client container, the permitted
values are
JMSContext.SESSION_TRANSACTED
,JMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
andJMSContext.DUPS_OK_ACKNOWLEDGE
. - If this method is called in the Jakarta EE web or EJB container when there is an active JTA transaction in progress then this argument is ignored.
- If this method is called in the Jakarta EE web or EJB container when there is no active JTA transaction in progress,
the permitted values are
JMSContext.AUTO_ACKNOWLEDGE
andJMSContext.DUPS_OK_ACKNOWLEDGE
. In this case the valuesJMSContext.TRANSACTED
andJMSContext.CLIENT_ACKNOWLEDGE
are not permitted.
- If this method is called in a Java SE environment or in the Jakarta EE application client container, the permitted
values are
- Returns:
- a newly created JMSContext
- See Also:
JMSContext.SESSION_TRANSACTED
,JMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
,JMSContext.DUPS_OK_ACKNOWLEDGE
,ConnectionFactory.createContext()
,ConnectionFactory.createContext(java.lang.String, java.lang.String)
,ConnectionFactory.createContext(java.lang.String, java.lang.String, int)
,JMSContext.createContext(int)
- If
-
createContext
public JMSContext createContext(java.lang.String userName, java.lang.String password)
Description copied from interface:ConnectionFactory
Creates a JMSContext with the specified user identity and an unspecified sessionMode.A connection and session are created for use by the new JMSContext. The connection is created in stopped mode but will be automatically started when a JMSConsumer.
The behaviour of the session that is created depends on whether this method is called in a Java SE environment, in the Jakarta EE application client container, or in the Jakarta EE web or EJB container. If this method is called in the Jakarta EE web or EJB container then the behaviour of the session also depends on whether or not there is an active JTA transaction in progress.
In a Java SE environment or in the Jakarta EE application client container:
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
JMSContext.AUTO_ACKNOWLEDGE
For a definition of the meaning of this acknowledgement mode see the link below.
In a Jakarta EE web or EJB container, when there is an active JTA transaction in progress:
- The session will participate in the JTA transaction and will be committed or rolled back when that transaction is
committed or rolled back, not by calling the
JMSContext
'scommit
orrollback
methods.
In the Jakarta EE web or EJB container, when there is no active JTA transaction in progress:
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
JMSContext.AUTO_ACKNOWLEDGE
For a definition of the meaning of this acknowledgement mode see the link below.
- Specified by:
createContext
in interfaceConnectionFactory
- Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created JMSContext
- See Also:
JMSContext.AUTO_ACKNOWLEDGE
,ConnectionFactory.createContext()
,ConnectionFactory.createContext(int)
,ConnectionFactory.createContext(java.lang.String, java.lang.String, int)
,JMSContext.createContext(int)
- The session will be non-transacted and received messages will be acknowledged automatically using an
acknowledgement mode of
-
createContext
public JMSContext createContext(java.lang.String userName, java.lang.String password, int sessionMode)
Description copied from interface:ConnectionFactory
Creates a JMSContext with the specified user identity and the specified session mode.A connection and session are created for use by the new JMSContext. The JMSContext is created in stopped mode but will be automatically started when a JMSConsumer is created.
The effect of setting the
sessionMode
argument depends on whether this method is called in a Java SE environment, in the Jakarta EE application client container, or in the Jakarta EE web or EJB container. If this method is called in the Jakarta EE web or EJB container then the effect of setting thesessionMode
argument also depends on whether or not there is an active JTA transaction in progress.In a Java SE environment or in the Jakarta EE application client container:
- If
sessionMode
is set toJMSContext.SESSION_TRANSACTED
then the session will use a local transaction which may subsequently be committed or rolled back by calling theJMSContext
'scommit
orrollback
methods. - If
sessionMode
is set to any ofJMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
orJMSContext.DUPS_OK_ACKNOWLEDGE
. then the session will be non-transacted and messages received by this session will be acknowledged according to the value ofsessionMode
. For a definition of the meaning of these acknowledgement modes see the links below.
In a Jakarta EE web or EJB container, when there is an active JTA transaction in progress:
- The argument
sessionMode
is ignored. The session will participate in the JTA transaction and will be committed or rolled back when that transaction is committed or rolled back, not by calling theJMSContext
'scommit
orrollback
methods. Since the argument is ignored, developers are recommended to usecreateContext(String userName, String password)
instead of this method.
In the Jakarta EE web or EJB container, when there is no active JTA transaction in progress:
- The argument
acknowledgeMode
must be set to either ofJMSContext.AUTO_ACKNOWLEDGE
orJMSContext.DUPS_OK_ACKNOWLEDGE
. The session will be non-transacted and messages received by this session will be acknowledged automatically according to the value ofacknowledgeMode
. For a definition of the meaning of these acknowledgement modes see the links below. The valuesJMSContext.SESSION_TRANSACTED
andJMSContext.CLIENT_ACKNOWLEDGE
may not be used.
- Specified by:
createContext
in interfaceConnectionFactory
- Parameters:
userName
- the caller's user namepassword
- the caller's passwordsessionMode
- indicates which of four possible session modes will be used.- If this method is called in a Java SE environment or in the Jakarta EE application client container, the permitted
values are
JMSContext.SESSION_TRANSACTED
,JMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
andJMSContext.DUPS_OK_ACKNOWLEDGE
. - If this method is called in the Jakarta EE web or EJB container when there is an active JTA transaction in progress then this argument is ignored.
- If this method is called in the Jakarta EE web or EJB container when there is no active JTA transaction in progress,
the permitted values are
JMSContext.AUTO_ACKNOWLEDGE
andJMSContext.DUPS_OK_ACKNOWLEDGE
. In this case the valuesJMSContext.TRANSACTED
andJMSContext.CLIENT_ACKNOWLEDGE
are not permitted.
- If this method is called in a Java SE environment or in the Jakarta EE application client container, the permitted
values are
- Returns:
- a newly created JMSContext
- See Also:
JMSContext.SESSION_TRANSACTED
,JMSContext.CLIENT_ACKNOWLEDGE
,JMSContext.AUTO_ACKNOWLEDGE
,JMSContext.DUPS_OK_ACKNOWLEDGE
,ConnectionFactory.createContext()
,ConnectionFactory.createContext(int)
,ConnectionFactory.createContext(java.lang.String, java.lang.String)
,JMSContext.createContext(int)
- If
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classcom.tibco.tibjms.TibjmsxCFImpl
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classcom.tibco.tibjms.TibjmsxCFImpl
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classcom.tibco.tibjms.TibjmsxCFImpl
- Throws:
java.lang.CloneNotSupportedException
-
setServerUrl
public void setServerUrl(java.lang.String serverUrl) throws JMSException
Connections created by this connection factory will connect to the server at the given URL- Parameters:
serverUrl
-- Throws:
JMSException
-
setClientID
public void setClientID(java.lang.String clientID) throws JMSException
- Parameters:
clientID
- The clientID that will be sent to the server when a Connection is created.- Throws:
JMSException
-
setMetric
public void setMetric(int metric) throws JMSException
This sets the metric that will be used to select an ems server during load balancing switchover. Allowed values are defined in the Tibjms class, with names like FACTORY_LOAD_BALANCE_METRIC_*- Parameters:
metric
- The metric to use during load balancing switchover.- Throws:
JMSException
- See Also:
Tibjms
-
setConnAttemptCount
public void setConnAttemptCount(int attempts)
- Parameters:
attempts
- The number of times the connection object attempts to establish a connection to the server.
-
setConnAttemptDelay
public void setConnAttemptDelay(int delay)
- Parameters:
delay
- The delay time between successive attempts to establish a connection to the server. Its value is the time (in milliseconds) between connection attempts.
-
setReconnAttemptCount
public void setReconnAttemptCount(int attempts)
- Parameters:
attempts
- The number of times that a connection object attempts to reestablish a connection to the server.
-
setReconnAttemptDelay
public void setReconnAttemptDelay(int delay)
- Parameters:
delay
- The delay time between successive attempts to reconnect to the server. Its value is the time (in milliseconds) between reconnection attempts.
-
setUserName
public void setUserName(java.lang.String username)
- Parameters:
username
- The connection object presents this user identity to the server.
-
setUserPassword
public void setUserPassword(java.lang.String password)
- Parameters:
password
- The connection object authenticates the user identity with this password.
-
setSSLVendor
public void setSSLVendor(java.lang.String vendor)
Set the TLS vendor to the specified vendor. The vendor parameter should be one of 'j2se' or 'bcfips'. After the TLS environment has been initialized, the vendor cannot be changed and calls to this methods are ignored.- Parameters:
vendor
- Specifies the TLS implementation to be used for creating TLS connections.- See Also:
TibjmsSSL
-
setSSLTrace
public void setSSLTrace(java.lang.Boolean trace)
- Parameters:
trace
- Set true to enable tracing of TLS related operations.
-
setSSLDebugTrace
public void setSSLDebugTrace(java.lang.Boolean debugTrace)
Enables debug tracing. When 'j2se' TLS vendor is used debug tracing should be enabled via javax.net.debug system property.- Parameters:
debugTrace
- Set to true to enable debug tracing.
-
setSSLEnableVerifyHost
public void setSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost)
Set if the host certificate should be verified by the client. By default it is always enabled.- Parameters:
enableVerifyHost
-
-
setSSLEnableVerifyHostName
public void setSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName)
Set if the name in the host certificate should be verified or not. By default this is always enabled.- Parameters:
enableVerifyHostName
-
-
setSSLExpectedHostName
public void setSSLExpectedHostName(java.lang.String expectedHostName)
Set the name which is expected to be set in the host certificate. Name in the certificate is present in the CN field of the certificate subject. By default the expected certificate name is the name of the connected host.- Parameters:
expectedHostName
-
-
setSSLAuthOnly
public void setSSLAuthOnly(java.lang.Boolean authOnly)
Set client connections to use TLS only during initial connection authentication. If parameter istrue
then connections use TLS only for authentication and switch to TCP protocol for all subsequent messaging. If parameter isfalse
then TLS is used for the lifetime of the connection, which is the default mode. Connections use this setting at the time they are created. Changing this setting only affects connection created after the change. By default this parameter is disabled.- Parameters:
authOnly
- Set true to only use TLS for authentication, false to use TLS for the lifetime of the connections.
-
setSSLTrustedCertificate
public void setSSLTrustedCertificate(java.lang.String certificate)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these. TLS clients may verify them during the TLS handshake; if your program verifies host certificates, then you must register trusted certificates as well. If the ConnectionFactory already has trusted certificates, this call adds to that set; it does not overwrite them.- Parameters:
certificate
-
-
setSSLTrustedCertificate
public void setSSLTrustedCertificate(java.lang.String certificate, java.lang.String trustedEncoding)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these. TLS clients may verify them during the TLS handshake; if your program verifies host certificates, then you must register trusted certificates as well. If the ConnectionFactory already has trusted certificates, this call adds to that set; it does not overwrite them.- Parameters:
certificate
-trustedEncoding
-
-
setSSLTrustedCertificate
public void setSSLTrustedCertificate(byte[] certificate, java.lang.String trustedEncoding)
Trusted certificates are certificates that authenticate the server's certificate; the certificate authority (CA) that issued the server's certificate supplies these. TLS clients may verify them during the TLS handshake; if your program verifies host certificates, then you must register trusted certificates as well. If the ConnectionFactory already has trusted certificates, this call adds to that set; it does not overwrite them.- Parameters:
certificate
- The certificate, represented as raw bytes.trustedEncoding
-
-
setSSLIssuerCertificate
public void setSSLIssuerCertificate(java.lang.String certificate)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these. TLS clients must supply them during the TLS handshake, so your program must set them.- Parameters:
certificate
-
-
setSSLIssuerCertificate
public void setSSLIssuerCertificate(java.lang.String certificate, java.lang.String encoding)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these. TLS clients must supply them during the TLS handshake, so your program must set them.- Parameters:
certificate
-encoding
-
-
setSSLIssuerCertificate
public void setSSLIssuerCertificate(byte[] certificate, java.lang.String encoding)
Issuer certificates are certificates that authenticate the client's certificate; the certificate authority (CA) that issued the client's certificate supplies these. TLS clients must supply them during the TLS handshake, so your program must set them.- Parameters:
certificate
- The certificate as binary dataencoding
- The encoding type for this certificate
-
setSSLIdentity
public void setSSLIdentity(java.lang.String sslIdentity)
The client's digital certificate. For more information on file types for digital certificates, see "File Names for Certificates and Keys" in the EMS User Guide.- Parameters:
sslIdentity
-
-
setSSLIdentity
public void setSSLIdentity(byte[] identity)
The client's digital certificate. For more information on file types for digital certificates, see "File Names for Certificates and Keys" in the EMS User Guide.- Parameters:
identity
-
-
setSSLIdentityEncoding
public void setSSLIdentityEncoding(java.lang.String sslIdentityEncoding)
The encoding of the client identity specified in the setSSLIdentity() method.- Parameters:
sslIdentityEncoding
-
-
setSSLPrivateKey
public void setSSLPrivateKey(java.lang.String sslPrivateKey)
Set the private key corresponding to the identity certificate.- Parameters:
sslPrivateKey
-
-
setSSLPrivateKey
public void setSSLPrivateKey(byte[] sslPrivateKey)
Set the private key corresponding to the identity certificate.- Parameters:
sslPrivateKey
-
-
setSSLPrivateKeyEncoding
public void setSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding)
Set the private key corresponding to the identity certificate.- Parameters:
sslPrivateKeyEncoding
-
-
setSSLPassword
public void setSSLPassword(java.lang.String sslPassword)
Set the private key password for TLS.- Parameters:
sslPassword
-
-
setSSLCipherSuites
public void setSSLCipherSuites(java.lang.String suites)
Set cipher suites to be used by SSL connections.- Parameters:
suites
-
-
setSSLProxy
public void setSSLProxy(java.lang.String host, int port) throws JMSException
Set the connection factory's parameters for connecting through a TLS proxy. A TLS proxy lets an EMS application create a TLS connection to an EMS server, even though a firewall separates the application from the server. The proxy usually runs within the firewall's DMZ. A connection factory contacts the TLS proxy, requesting a TLS connection to the server. The proxy authenticates the application program, and mediates the initial TLS negotiation between application and server. After the TLS connection is established, the application and server use it to communicate directly with one another.- Parameters:
host
- the connection factory establishes TLS communication through a web proxy at this host. Supply a simple hostname, a fully qualified hostname with domain name, or an IP address (dot notation).port
- the connection factory establishes TLS communication through a web proxy on this port.- Throws:
JMSException
- if the proxy host is null or empty, the port is zero or the protocol of the connection factory's URL is not TLS.
-
setSSLProxyAuth
public void setSSLProxyAuth(java.lang.String username, java.lang.String password) throws JMSException
Set a connection factory's username and password for connecting through a TLS proxy. When a connection factory establishes an EMS server connection through a TLS proxy host, the proxy might first require authentication before facilitating a connection. When required, use this call to set that authentication data on the connection factory. Notice that this proxy authentication data is distinct from the server authentication data, and from the TLS private key encryption password.- Parameters:
username
- the connection factory authenticates itself to the TLS proxy using this username.password
- the connection factory authenticates itself to the TLS proxy using this password.- Throws:
JMSException
- if the protocol of the connection factory's URL is not TLS.
-
getSSLProxyHost
public java.lang.String getSSLProxyHost() throws JMSException
Get the TLS proxy host from this connection factory.- Returns:
- the host
- Throws:
JMSException
- if the protocol of the connection factory's URL is not TLS.
-
getSSLProxyPort
public int getSSLProxyPort() throws JMSException
Get the TLS proxy port from this connection factory.- Returns:
- the port.
- Throws:
JMSException
- if the protocol of the connection factory's URL is not TLS.
-
getSSLProxyUser
public java.lang.String getSSLProxyUser() throws JMSException
Get the TLS proxy username from a connection factory.- Returns:
- the username.
- Throws:
JMSException
- if the protocol of the connection factory's URL is not TLS.
-
getSSLProxyPassword
public java.lang.String getSSLProxyPassword() throws JMSException
Get the TLS proxy password from a connection factory.- Returns:
- the password.
- Throws:
JMSException
- if the protocol of the connection factory's URL is not TLS.
-
setConnAttemptTimeout
public void setConnAttemptTimeout(int timeout)
Set the Connect Attempt timeout for a given connection. Note: This timeout is per url and per connect_attempt. So if one were to specify 2 connect attempts for a given url then for each attempt the client will wait utmost connect attempt timeout for the connection to be established, if no connection is esablished within that time, the client's connection attempt is teared down if the client is hung either because of system resources unavailable on the server machine or because of some other error in the EMS Server NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used.- Parameters:
timeout
- the timeout is in milliseconds
-
setReconnAttemptTimeout
public void setReconnAttemptTimeout(int timeout)
Set the Reconnect Attempt timeout for a given connection Note: This timeout is per url and per reconnect_attempt. So if one were to specify 2 reconnect attempts for a given url then for each attempt the client will wait utmost reconnect attempt timeout for the connection to be established, if no connection is esablished within that time, the client's reconnection attempt is teared down if the client is hung either because of system resources unavailable on the server machine or because of some other error in the EMS Server NOTE: minimum value is 100 milliseconds, if value less than 100 milliseconds is specified, then during the connection establishment the minimum value of 100 milliseconds is used.- Parameters:
timeout
- the timeout is in milliseconds
-
setMulticastEnabled
@Deprecated public void setMulticastEnabled(boolean enabled)
Deprecated.As of release 8.3Set whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
When enabled, MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
The default is enabled.- Parameters:
enabled
-true
to enable multicast,false
to disable multicast- Since:
- EMS 5.0
-
setMulticastDaemon
@Deprecated public void setMulticastDaemon(java.lang.String port) throws JMSException
Deprecated.As of release 8.3Set the port on which the EMS client will connect to the multicast daemon.
A connection to the multicast daemon is required when multicast is enabled and a MessageConsumer is subscribed to a multicast-enabled topic.
NOTE: setting the port with this method will override the default port supplied by the EMS server.- Parameters:
port
- the port of the multicast daemon- Throws:
JMSException
- Since:
- EMS 5.0
-
-