public class MQBrokerConnectionParameters extends java.lang.Object implements BrokerConnectionParameters
Applications should create an instance of this class if they require the hostname, port, queue manager and (optionally) security exit information in order to connect. In order to attempt a connection, the instance must then be passed to the BrokerProxy.getInstance() method. For example:
BrokerProxy.getInstance( new MQBrokerConnectionParameters( "mymachine.domain.com", 1414, "MYQM"));Note that once the getInstance() method has been called, modifying the MQBrokerConnectionParameters object will have no effect on existing connections.
To connect to a broker defined on the local machine, it is recommended that you use BrokerProxy.getLocalInstance(String) instead.
class
com.ibm.broker.config.proxy.MQBrokerConnectionParameters
implements
com.ibm.broker.config.proxy.BrokerConnectionParameters
|
|
Responsibilities | Represents a set of connection parameters to a WebSphere MQ based Message Broker. |
Collaborators | com.ibm.mq.* |
Change Activity: --------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: --------- ----------- ------------- ------------------------------------ f51619.1 2008-07-16 HDMPL v7 Release
Constructor and Description |
---|
MQBrokerConnectionParameters(java.lang.String ip,
int port,
java.lang.String qmgr)
Takes the parameters required to connect to a WebSphere-MQ based broker.
|
MQBrokerConnectionParameters(java.lang.String ip,
int port,
java.lang.String qmgr,
java.lang.String mqseClassname)
Takes the parameters required to connect to a WebSphere-MQ based broker.
|
MQBrokerConnectionParameters(java.lang.String ip,
int port,
java.lang.String qmgr,
java.lang.String mqseClassname,
java.net.URL mqseURL)
Takes the parameters required to connect to a WebSphere-MQ based broker.
|
MQBrokerConnectionParameters(java.lang.String ip,
int port,
java.lang.String qmgr,
java.lang.String mqseClassname,
java.net.URL mqseURL,
java.lang.String sslCipherSuite,
java.lang.String sslPeerName,
java.lang.String sslKeyStore,
java.lang.String sslTrustStore,
java.util.Collection<java.security.cert.CertStore> sslCRLLdapCollection)
Takes the parameters required to connect to a WebSphere-MQ based broker.
|
MQBrokerConnectionParameters(java.lang.String ip,
int port,
java.lang.String qmgr,
java.lang.String mqseClassname,
java.net.URL mqseURL,
java.lang.String sslCipherSuite,
java.lang.String sslPeerName,
java.lang.String sslKeyStore,
java.lang.String sslTrustStore,
java.lang.String sslCRLLdapList)
Takes the parameters required to connect to a WebSphere-MQ based broker.
|
Modifier and Type | Method and Description |
---|---|
static void |
disableMQJavaClientTracing()
Disables WebSphere MQ Java Client tracing
|
static void |
enableMQJavaClientTracing(java.lang.String filename)
Starts level 5 WebSphere MQ Java Client tracing.
|
com.ibm.broker.config.proxy.CommsMessageSerializer |
getProtocol()
This method is required by the Message Broker Administration API and
should not be called by user applications.
|
com.ibm.broker.config.proxy.Receiver |
getReceiver()
This method is required by the Message Broker Administration API and
should not be called by user applications.
|
com.ibm.broker.config.proxy.Sender |
getSender()
This method is required by the Message Broker Administration API and
should not be called by user applications.
|
java.lang.String |
getSessionIDString()
Returns a String representation of the session Id for this connection
to the broker.
|
static java.lang.String[] |
getSupportedSSLCipherSuites()
Minimum set of supported SSL Cipher Suites
|
java.lang.String |
getUserID()
Returns the userid that will be used to authorize this
application with the broker.
|
void |
setAdvancedConnectionParameters(java.lang.String channelName,
java.lang.String requestQueueName,
java.lang.String responseQueueName,
int maxRetries,
int retryWaitMillis,
byte[] sessionID)
Sets advanced options for a connection to MQ.
|
static void |
setSSLFIPSEnabled(boolean sslUseFIPS)
Enables the use of FIPS compliant ciphers for all future SSL
connections in this JVM.
|
void |
setSSLKeyStorePassword(java.lang.String password)
Sets the SSL key store password for the current connection.
|
void |
setSSLTrustStorePassword(java.lang.String password)
Sets the SSL trust store password for the current connection.
|
java.lang.String |
toString()
For diagnostic information, this method displays
the current connection parameters.
|
public MQBrokerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr)
ip
- IP Address of the target serverport
- Port of the target serverqmgr
- WebSphere MQ Queue Manager which the broker is usingpublic MQBrokerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr, java.lang.String mqseClassname)
ip
- IP Address of the target serverport
- Port of the target serverqmgr
- WebSphere MQ Queue Manager which the broker is usingmqseClassname
- Name of the Security Exit to use with this connection.
The Security Exit will be loaded using the standard class loader.public MQBrokerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr, java.lang.String mqseClassname, java.net.URL mqseURL)
ip
- IP Address of the target serverport
- Port of the target serverqmgr
- WebSphere MQ Queue Manager which the broker is usingmqseClassname
- Name of the Security Exit to use with this connection.
If running inside an Eclipse environment, callers should also use the mqseURL
parameter.mqseURL
- URL that describes where the MQ Security Exit can be loaded.
If null, the standard class loader will be used to locate and instantiate
the security exit class.public MQBrokerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr, java.lang.String mqseClassname, java.net.URL mqseURL, java.lang.String sslCipherSuite, java.lang.String sslPeerName, java.lang.String sslKeyStore, java.lang.String sslTrustStore, java.lang.String sslCRLLdapList)
ip
- IP Address of the target serverport
- Port of the target serverqmgr
- WebSphere MQ Queue Manager which the broker is usingmqseClassname
- - Name of the Security Exit to use with this connection.
If running inside an Eclipse environment, callers should also use the mqseURL
parameter.mqseURL
- URL that describes where the MQ Security Exit can be loaded.
If null, the standard class loader will be used to locate and instantiate
the security exit class.sslCipherSuite
- SSL CipherSuite to be usedsslPeerName
- SSL Peername to be usedsslKeyStore
- SSL KeyStore to be usedsslTrustStore
- SSL TrustStore to be usedsslCRLLdapList
- A comma seperated list of LDAP servers hosting CRLspublic MQBrokerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr, java.lang.String mqseClassname, java.net.URL mqseURL, java.lang.String sslCipherSuite, java.lang.String sslPeerName, java.lang.String sslKeyStore, java.lang.String sslTrustStore, java.util.Collection<java.security.cert.CertStore> sslCRLLdapCollection)
ip
- IP Address of the target serverport
- Port of the target serverqmgr
- WebSphere MQ Queue Manager which the broker is usingmqseClassname
- Name of the Security Exit to use with this connection.
If running inside an Eclipse environment, callers should also use the mqseURL
parameter.mqseURL
- URL that describes where the MQ Security Exit can be loaded.
If null, the standard class loader will be used to locate and instantiate
the security exit class.sslCipherSuite
- SSL CipherSuite to be usedsslPeerName
- SSL Peername to be usedsslKeyStore
- SSL KeyStore to be usedsslTrustStore
- SSL TrustStore to be usedsslCRLLdapCollection
- A collection of CertStore objects representing LDAP servers hosting CRLspublic void setSSLKeyStorePassword(java.lang.String password)
password
- Password for the key storepublic void setSSLTrustStorePassword(java.lang.String password)
password
- Password for the trust storepublic static void setSSLFIPSEnabled(boolean sslUseFIPS)
sslUseFIPS
- Only if this is true, FIPS compliance will be enabled
on all future connections to SSL queue managers within this JVM.public void setAdvancedConnectionParameters(java.lang.String channelName, java.lang.String requestQueueName, java.lang.String responseQueueName, int maxRetries, int retryWaitMillis, byte[] sessionID)
channelName
- The name of the WebSphere MQ Server Connection channel
to use. If this is set to null, the existing value will be used.requestQueueName
- This parameter is currently ignored.responseQueueName
- This parameter is currently ignored.maxRetries
- The number of times the Administration API should retry sending
messages after consecutive failures. If this is set to -1, the existing
value will be used.retryWaitMillis
- The time (in milliseconds) the Administration API should
wait inbetween retries. If this is set to -1, the existing value will
be used.sessionID
- A byte array containing an identifier that uniquely
identifies this connection to the broker. This will be used as
a correlId, and so should be no longer than 24 bytes. If this is set
to null, the existing value will be used.public com.ibm.broker.config.proxy.Sender getSender() throws ConfigManagerProxyLoggedException
getSender
in interface BrokerConnectionParameters
ConfigManagerProxyLoggedException
- if the security exit
could not be instantiatedpublic com.ibm.broker.config.proxy.Receiver getReceiver() throws ConfigManagerProxyLoggedException
getReceiver
in interface BrokerConnectionParameters
ConfigManagerProxyLoggedException
- if the security exit
could not be instantiatedpublic com.ibm.broker.config.proxy.CommsMessageSerializer getProtocol()
getProtocol
in interface BrokerConnectionParameters
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getUserID()
getUserID
in interface BrokerConnectionParameters
public static final void enableMQJavaClientTracing(java.lang.String filename)
filename
- of the trace filepublic static final void disableMQJavaClientTracing()
public java.lang.String getSessionIDString()
public static final java.lang.String[] getSupportedSSLCipherSuites()