TIBCO Enterprise Message Service
Version 4.3.0

com.tibco.tibjms
Class TibjmsConnectionFactory

java.lang.Object
  extended byTibjmsxCFImpl
      extended bycom.tibco.tibjms.TibjmsConnectionFactory
All Implemented Interfaces:
java.lang.Cloneable, ConnectionFactory, java.io.Externalizable, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
TibjmsQueueConnectionFactory, TibjmsTopicConnectionFactory

public class TibjmsConnectionFactory
extends TibjmsxCFImpl
implements ConnectionFactory, java.io.Externalizable, javax.naming.Referenceable, java.lang.Cloneable

Reconnect and Fault Tolerance
To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL (for example, tcp://localhost:7222,tcp://localhost:7222).

See Also:
Serialized Form

Constructor Summary
TibjmsConnectionFactory()
           
TibjmsConnectionFactory(java.lang.String serverUrl)
           
TibjmsConnectionFactory(java.lang.String serverUrl, java.lang.String clientId, java.util.Map properties)
           
 
Method Summary
 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.
 java.lang.String getSSLProxyHost()
          Get the SSL proxy host from this connection factory.
 java.lang.String getSSLProxyPassword()
          Get the SSL proxy password from a connection factory.
 int getSSLProxyPort()
          Get the SSL proxy port from this connection factory.
 java.lang.String getSSLProxyUser()
          Get the SSL 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 setMetric(int metric)
           
 void setReconnAttemptCount(int attempts)
          Set the maximum number of reconnect attempts.
 void setReconnAttemptDelay(int delay)
          Set the delay between reconnect attempts.
 void setServerUrl(java.lang.String serverUrl)
           
 void setSSLAuthOnly(java.lang.Boolean authOnly)
           
 void setSSLCipherSuites(java.lang.String suites)
           
 void setSSLDebugTrace(java.lang.Boolean debugTrace)
           
 void setSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost)
           
 void setSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName)
           
 void setSSLExpectedHostName(java.lang.String expectedHostName)
           
 void setSSLIdentity(byte[] identity)
           
 void setSSLIdentity(java.lang.String sslIdentity)
           
 void setSSLIdentityEncoding(java.lang.String sslIdentityEncoding)
           
 void setSSLIssuerCertificate(byte[] certificate, java.lang.String encoding)
           
 void setSSLIssuerCertificate(java.lang.String certificate)
           
 void setSSLIssuerCertificate(java.lang.String certificate, java.lang.String encoding)
           
 void setSSLPassword(java.lang.String sslPassword)
           
 void setSSLPrivateKey(byte[] sslPrivateKey)
           
 void setSSLPrivateKey(java.lang.String sslPrivateKey)
           
 void setSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding)
           
 void setSSLProxy(java.lang.String host, int port)
          Set the connection factory's parameters for connecting through an SSL proxy.
 void setSSLProxyAuth(java.lang.String username, java.lang.String password)
          Set a connection factory's username and password for connecting through an SSL proxy.
 void setSSLRenegotiateInterval(java.lang.Integer sslRenegotiateInterval)
          Deprecated. This method is no longer supported, and may be removed from future versions of EMS.
 void setSSLRenegotiateSize(java.lang.Integer sslRegotiateSize)
          Deprecated. This method is no longer supported, and may be removed from future versions of EMS.
 void setSSLTrace(java.lang.Boolean trace)
           
 void setSSLTrustedCertificate(byte[] certificate, java.lang.String trustedEncoding)
           
 void setSSLTrustedCertificate(java.lang.String certificate)
           
 void setSSLTrustedCertificate(java.lang.String certificate, java.lang.String trustedEncoding)
           
 void setSSLVendor(java.lang.String vendor)
           
 void setUserName(java.lang.String username)
           
 void setUserPassword(java.lang.String password)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Constructor Detail

TibjmsConnectionFactory

public TibjmsConnectionFactory()

TibjmsConnectionFactory

public TibjmsConnectionFactory(java.lang.String serverUrl)

TibjmsConnectionFactory

public TibjmsConnectionFactory(java.lang.String serverUrl,
                               java.lang.String clientId,
                               java.util.Map 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 the Connection.start method is explicitly called.

Specified by:
createConnection in interface ConnectionFactory
Returns:
a newly created connection
Throws:
JMSException - if the JMS provider fails to create the connection due to some internal error.

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 the Connection.start method is explicitly called.

Specified by:
createConnection in interface ConnectionFactory
Parameters:
userName - the caller's user name
password - the caller's password
Returns:
a newly created connection
Throws:
JMSException - if the JMS provider fails to create the connection due to some internal error.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

setServerUrl

public void setServerUrl(java.lang.String serverUrl)
                  throws JMSException
Throws:
JMSException

setClientID

public void setClientID(java.lang.String clientID)
                 throws JMSException
Throws:
JMSException

setMetric

public void setMetric(int metric)
               throws JMSException
Throws:
JMSException

setConnAttemptCount

public void setConnAttemptCount(int attempts)

setConnAttemptDelay

public void setConnAttemptDelay(int delay)

setReconnAttemptCount

public void setReconnAttemptCount(int attempts)
Set the maximum number of reconnect attempts. To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL.


setReconnAttemptDelay

public void setReconnAttemptDelay(int delay)
Set the delay between reconnect attempts. To enable reconnection behavior and fault tolerance, the connection factory's server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server's URL.


setUserName

public void setUserName(java.lang.String username)

setUserPassword

public void setUserPassword(java.lang.String password)

setSSLVendor

public void setSSLVendor(java.lang.String vendor)

setSSLTrace

public void setSSLTrace(java.lang.Boolean trace)

setSSLDebugTrace

public void setSSLDebugTrace(java.lang.Boolean debugTrace)

setSSLEnableVerifyHost

public void setSSLEnableVerifyHost(java.lang.Boolean enableVerifyHost)

setSSLEnableVerifyHostName

public void setSSLEnableVerifyHostName(java.lang.Boolean enableVerifyHostName)

setSSLExpectedHostName

public void setSSLExpectedHostName(java.lang.String expectedHostName)

setSSLAuthOnly

public void setSSLAuthOnly(java.lang.Boolean authOnly)

setSSLTrustedCertificate

public void setSSLTrustedCertificate(java.lang.String certificate)

setSSLTrustedCertificate

public void setSSLTrustedCertificate(java.lang.String certificate,
                                     java.lang.String trustedEncoding)

setSSLTrustedCertificate

public void setSSLTrustedCertificate(byte[] certificate,
                                     java.lang.String trustedEncoding)

setSSLIssuerCertificate

public void setSSLIssuerCertificate(java.lang.String certificate)

setSSLIssuerCertificate

public void setSSLIssuerCertificate(java.lang.String certificate,
                                    java.lang.String encoding)

setSSLIssuerCertificate

public void setSSLIssuerCertificate(byte[] certificate,
                                    java.lang.String encoding)

setSSLIdentity

public void setSSLIdentity(java.lang.String sslIdentity)

setSSLIdentity

public void setSSLIdentity(byte[] identity)

setSSLIdentityEncoding

public void setSSLIdentityEncoding(java.lang.String sslIdentityEncoding)

setSSLPrivateKey

public void setSSLPrivateKey(java.lang.String sslPrivateKey)

setSSLPrivateKey

public void setSSLPrivateKey(byte[] sslPrivateKey)

setSSLPrivateKeyEncoding

public void setSSLPrivateKeyEncoding(java.lang.String sslPrivateKeyEncoding)

setSSLPassword

public void setSSLPassword(java.lang.String sslPassword)

setSSLRenegotiateSize

public void setSSLRenegotiateSize(java.lang.Integer sslRegotiateSize)
Deprecated. This method is no longer supported, and may be removed from future versions of EMS.


setSSLRenegotiateInterval

public void setSSLRenegotiateInterval(java.lang.Integer sslRenegotiateInterval)
Deprecated. This method is no longer supported, and may be removed from future versions of EMS.


setSSLCipherSuites

public void setSSLCipherSuites(java.lang.String suites)

setSSLProxy

public void setSSLProxy(java.lang.String host,
                        int port)
                 throws JMSException
Set the connection factory's parameters for connecting through an SSL proxy. An SSL proxy lets an EMS application create an SSL 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 SSL proxy, requesting an SSL connection to the server. The proxy authenticates the application program, and mediates the initial SSL negotiation between application and server. After the SSL connection is established, the application and server use it to communicate directly with one another.

Parameters:
host - the connection factory establishes SSL 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 SSL 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 SSL.

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 an SSL proxy. When a connection factory establishes an EMS server connection through an SSL 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 SSL private key encryption password.

Parameters:
username - the connection factory authenticates itself to the SSL proxy using this username.
password - the connection factory authenticates itself to the SSL proxy using this password.
Throws:
JMSException - if the protocol of the connection factory's URL is not SSL.

getSSLProxyHost

public java.lang.String getSSLProxyHost()
                                 throws JMSException
Get the SSL proxy host from this connection factory.

Returns:
the host
Throws:
JMSException - if the protocol of the connection factory's URL is not SSL.

getSSLProxyPort

public int getSSLProxyPort()
                    throws JMSException
Get the SSL proxy port from this connection factory.

Returns:
the port.
Throws:
JMSException - if the protocol of the connection factory's URL is not SSL.

getSSLProxyUser

public java.lang.String getSSLProxyUser()
                                 throws JMSException
Get the SSL proxy username from a connection factory.

Returns:
the username.
Throws:
JMSException - if the protocol of the connection factory's URL is not SSL.

getSSLProxyPassword

public java.lang.String getSSLProxyPassword()
                                     throws JMSException
Get the SSL proxy password from a connection factory.

Returns:
the password.
Throws:
JMSException - if the protocol of the connection factory's URL is not SSL.

TIBCO Enterprise Message Service
Version 4.3.0

Copyright © TIBCO Software Inc. All rights reserved