public class MQPropertyFileBrokerConnectionParameters extends java.lang.Object implements BrokerConnectionParameters
Use the class in the following way:
BrokerConnectionParameters bcp = new MQPropertyFileBrokerConnectionParameters("b1.broker"); BrokerProxy.getInstance(bcp);
Files with a *.broker extension are obtained from the Message Broker Explorer by selecting the "Export *.broker file" option after right-clicking on a broker object.
The file contains all possible connection information required in order to connect to a remote broker and takes the following form:
<?xml version="1.0" encoding="UTF-8"?> <broker crlNameList="" domainName="" host="hostname.example.com" listenerPort="0" queueManager="MYQMGR" securityExit="" securityExitJar="" sslCipherSuite="NONE" sslDistinguishedNames="" sslKeyStore="" sslTrustStore="" svrconn="SYSTEM.BKR.CONFIG"/>(For compatibility with older applications, the root element "broker" can be altenatively set to "configmgr" with no effect.)
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.MQPropertyFileBrokerConnectionParameters
implements
com.ibm.broker.config.proxy.BrokerConnectionParameters
|
|
Responsibilities | Represents a set of connection parameters to a remote WebSphere MQ based broker. |
Collaborators | MQBrokerConnectionParameters |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ 51619.1 2008-07-16 HDMPL v7 Release 60252 2011-06-22 HDCAB Added setSSLxxxStorePassword methods
Constructor and Description |
---|
MQPropertyFileBrokerConnectionParameters(java.lang.String filename)
Constructs a new instance that refers to connection properties in the
file with the supplied fully qualified name.
|
Modifier and Type | Method and Description |
---|---|
static void |
disableMQJavaClientTracing()
Disables WebSphere MQ Java Client tracing
|
static void |
enableMQJavaClientTracing(java.lang.String filename)
Sends level 5 WebSphere MQ Java Client tracing to the specified file.
|
java.lang.String |
getHostname()
Returns the broker's IP address or
host name as stored in the properties file.
|
int |
getPort()
Returns the broker's port
as stored in the properties file.
|
com.ibm.broker.config.proxy.CommsMessageSerializer |
getProtocol()
This method is required by the IBM Integration API (CMP) and
should not be called by user applications.
|
java.lang.String |
getQueueManager()
Returns the broker's queue manager
as stored in the properties file.
|
com.ibm.broker.config.proxy.Receiver |
getReceiver()
This method is required by the IBM Integration API (CMP) and
should not be called by user applications.
|
java.lang.String |
getSecExit()
Returns the broker's security exit
as stored in the properties file.
|
java.net.URL |
getSecExitURL()
Returns the broker's security exit URL
as stored in the properties file.
|
com.ibm.broker.config.proxy.Sender |
getSender()
This method is required by the IBM Integration API (CMP) and
should not be called by user applications.
|
java.lang.String |
getSessionIDString()
Returns a String representation of the Session ID for this
connection.
|
java.lang.String |
getSSLCipherSuite()
Returns the broker's SSL cipher suite
as stored in the properties file.
|
java.lang.String |
getSSLCRLLDAPList()
Returns the broker's SSL CRL LDAP list
as stored in the properties file.
|
java.lang.String |
getSSLKeyStore()
Returns the broker's SSL key store
as stored in the properties file.
|
java.lang.String |
getSSLPeerName()
Returns the broker's SSL peer name
as stored in the properties file.
|
java.lang.String |
getSSLTrustStore()
Returns the broker's SSL trust store
as stored in the properties file.
|
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 the 'advanced' options for a connection to MQ.
|
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 MQPropertyFileBrokerConnectionParameters(java.lang.String filename)
filename
- Path and file name of the parameter file, which must be in
the *.broker format. Supplying a null or blank parameter
here has the same effect as calling the empty constructor.public java.lang.String getHostname()
public int getPort()
public java.lang.String getQueueManager()
public java.lang.String getSecExit()
public java.net.URL getSecExitURL()
public java.lang.String getSSLCipherSuite()
public java.lang.String getSSLCRLLDAPList()
public java.lang.String getSSLKeyStore()
public java.lang.String getSSLPeerName()
public java.lang.String getSSLTrustStore()
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 IBM Integration API (CMP)
should retry sending after consecutive failures.
If this is set to -1, the existing value will be
used.retryWaitMillis
- The time (in milliseconds) the IBM Integration API
(CMP) 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 void setSSLKeyStorePassword(java.lang.String password)
password
- Password for the key storepublic void setSSLTrustStorePassword(java.lang.String password)
password
- Password for the trust storepublic 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()