com.ibm.broker.config.proxy
Class MQConfigManagerConnectionParameters

java.lang.Object
  extended by com.ibm.broker.config.proxy.MQConfigManagerConnectionParameters
All Implemented Interfaces:
ConfigManagerConnectionParameters

public class MQConfigManagerConnectionParameters
extends java.lang.Object
implements ConfigManagerConnectionParameters

Allows user-written Configuration Manager Proxy applications to specify a set of connection parameters that can be used to connect to MQ-based Configuration Managers.

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 to a Configuration Manager. In order to attempt a connection, the instance must then be passed to the ConfigManagerProxy.getInstance() method. For example:

     ConfigManagerProxy.getInstance(
         new MQConfigManagerConnectionParameters(
             "mymachine.domain.com", 1414, "MYQM"));
 
Note that once the getInstance() method has been called, modifying the MQConfigManagerConnectionParameters object will have no effect on existing connections.

class com.ibm.broker.config.proxy.MQConfigManagerConnectionParameters implements com.ibm.broker.config.proxy.ConfigManagerConnectionParameters

Responsibilities Represents a set of connection parameters to a WebSphere MQ based Configuration Manager.
Collaborators com.ibm.mq.*

 Change Activity:
 --------- ----------- ------------- ------------------------------------
 Reason:   Date:       Originator:   Comments:
 --------- ----------- ------------- ------------------------------------
 f25103.1  2004-03-15  HDMPL         v6 Release
 f44739.7  2007-07-30  HDMPL         v6.1 Release:
                                         Methods now return genericized types where relevant

 

Version:
Config/com/ibm/broker/config/proxy/MQConfigManagerConnectionParameters.java, CMP, S000 1.43

Constructor Summary
MQConfigManagerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr)
          Takes the parameters required to connect to an MQSeries-based Config Manager.
MQConfigManagerConnectionParameters(java.lang.String ip, int port, java.lang.String qmgr, java.lang.String mqseClassname)
          Takes the parameters required to connect to an MQSeries-based Config Manager.
MQConfigManagerConnectionParameters(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 an MQSeries-based Config Manager.
MQConfigManagerConnectionParameters(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)
          Constructor.
MQConfigManagerConnectionParameters(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)
          Constructor.
 
Method Summary
 void disableDomainAwareness()
          Prevents Windows domain awareness support from initializing for this instance.
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.
static java.lang.String generateUniqueDeployID()
          Generates a deploy ID and returns it.
 java.lang.String getDeployID()
          Returns the string used to uniquely map each deployment request back to this ConfigManagerProxy connection.
 com.ibm.broker.config.common.CommsMessageSerializer getProtocol()
          This method is required by the Configuration Manager Proxy and should not be called by user applications.
 com.ibm.broker.config.proxy.Receiver getReceiver()
          This method is required by the Configuration Manager Proxy and should not be called by user applications.
 com.ibm.broker.config.proxy.Sender getSender()
          This method is required by the Configuration Manager Proxy 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 Configuration Manager.
static java.lang.String[] getSupportedSSLCipherSuites()
          Minimum set of supported SSL Cipher Suites
 java.lang.String getUserID()
          Crosses the JNI to return the correctly formatted MQSeries userId & domain.
 void setAdvancedConnectionParameters(java.lang.String channelName, java.lang.String requestQueueName, java.lang.String responseQueueName, int maxRetries, int retryWaitMillis, java.lang.String deployID, byte[] sessionID)
          Sets the 'advanced' options for a connection to MQ.
 java.lang.String toString()
          For diagnostic information, this method displays the current connection parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MQConfigManagerConnectionParameters

public MQConfigManagerConnectionParameters(java.lang.String ip,
                                           int port,
                                           java.lang.String qmgr)
Takes the parameters required to connect to an MQSeries-based Config Manager. Upon returning from this method, the supplied data will not have been validated and a connection to a Configuration Manager will not have been established. All this work takes place during the call to ConfigManagerProxy.getInstance().

Parameters:
ip - IP Address of the target server
port - Port of the target server
qmgr - MQSeries Queue Manager which the Configuration Manager is using

MQConfigManagerConnectionParameters

public MQConfigManagerConnectionParameters(java.lang.String ip,
                                           int port,
                                           java.lang.String qmgr,
                                           java.lang.String mqseClassname)
Takes the parameters required to connect to an MQSeries-based Config Manager. Upon returning from this method, the supplied data will not have been validated and a connection to a Configuration Manager will not have been established. All this work takes place during the call to ConfigManagerProxy.getInstance().

Parameters:
ip - IP Address of the target server
port - Port of the target server
qmgr - MQSeries Queue Manager which the Configuration Manager is using
mqseClassname - Name of the Security Exit to use with this connection. The Security Exit will be loaded using the standard class loader.

MQConfigManagerConnectionParameters

public MQConfigManagerConnectionParameters(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 an MQSeries-based Config Manager. Upon returning from this method, the supplied data will not have been validated and a connection to a Configuration Manager will not have been established. All this work takes place during the call to ConfigManagerProxy.getInstance().

Parameters:
ip - IP Address of the target server
port - Port of the target server
qmgr - MQSeries Queue Manager which the Configuration Manager is using
mqseClassname - 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.

MQConfigManagerConnectionParameters

public MQConfigManagerConnectionParameters(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)
Constructor. Takes the parameters required to connect to an MQSeries-based Config Manager. Upon returning from this method, the supplied data will not have been validated and a connection to a Configuration Manager will not have been established. All this work takes place during the call to ConfigManagerProxy.getInstance().

Parameters:
ip - - IP Address of the target server
port - - Port of the target server
qmgr - - MQSeries Queue Manager which the Configuration Manager is using
mqseClassname - - 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 used
sslPeerName - SSL Peername to be used
sslKeyStore - SSL KeyStore to be used
sslTrustStore - SSL TrustStore to be used
sslCRLLdapList - A comma seperated list of LDAP servers hosting CRLs

MQConfigManagerConnectionParameters

public MQConfigManagerConnectionParameters(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)
Constructor. Takes the parameters required to connect to an MQSeries-based Config Manager. Upon returning from this method, the supplied data will not have been validated and a connection to a Configuration Manager will not have been established. All this work takes place during the call to ConfigManagerProxy.getInstance().

Parameters:
ip - - IP Address of the target server
port - - Port of the target server
qmgr - - MQSeries Queue Manager which the Configuration Manager is using
mqseClassname - - 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 used
sslPeerName - SSL Peername to be used
sslKeyStore - SSL KeyStore to be used
sslTrustStore - SSL TrustStore to be used
sslCRLLdapCollection - A collection of CertStore objects represting LDAP servers hosting CRLs
Method Detail

setAdvancedConnectionParameters

public void setAdvancedConnectionParameters(java.lang.String channelName,
                                            java.lang.String requestQueueName,
                                            java.lang.String responseQueueName,
                                            int maxRetries,
                                            int retryWaitMillis,
                                            java.lang.String deployID,
                                            byte[] sessionID)
Sets the 'advanced' options for a connection to MQ. User-written Configuration Manager Proxy applications should never need to use this method.

Parameters:
channelName - The name of the MQSeries Server Connection channel to use. If this is set to null, the existing value will be used.
requestQueueName - The name of the MQSeries queue to which messages will be put. If this is set to null, the existing value will be used.
responseQueueName - The name of the MQSeries queue from which messages will be got. If this is set to null, the existing value will be used.
maxRetries - The number of times the MQSender should retry after consecutive failures. If this is set to -1, the existing value will be used.
retryWaitMillis - The time (in milliseconds) the MQSender should wait inbetween retries. If this is set to -1, the existing value will be used.
deployID - The String used to map deployment requests uniquely back to this connection. If this is set to null the existing value will be used.
sessionID - A byte array containing an identifier that uniquely identifies this connection to the Configuration Manager. 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.

getSender

public com.ibm.broker.config.proxy.Sender getSender()
                                             throws ConfigManagerProxyLoggedException
This method is required by the Configuration Manager Proxy and should not be called by user applications. Returns an instance of the Sender associated with this type.

Specified by:
getSender in interface ConfigManagerConnectionParameters
Returns:
Sender an object capable of transmitting a byte array to a Configuration Manager.
Throws:
ConfigManagerProxyLoggedException - if the security exit could not be instantiated

getReceiver

public com.ibm.broker.config.proxy.Receiver getReceiver()
                                                 throws ConfigManagerProxyLoggedException
This method is required by the Configuration Manager Proxy and should not be called by user applications. Returns an instance of the Receiver associated with this type.

Specified by:
getReceiver in interface ConfigManagerConnectionParameters
Returns:
Sender an object capable of receiving byte arrays from a Configuration Manager.
Throws:
ConfigManagerProxyLoggedException - if the security exit could not be instantiated

getProtocol

public com.ibm.broker.config.common.CommsMessageSerializer getProtocol()
This method is required by the Configuration Manager Proxy and should not be called by user applications. Returns an instance of the wire protocol associated with this connection.

Specified by:
getProtocol in interface ConfigManagerConnectionParameters
Returns:
CommsMessageSerializer - an object capable of turning Comms Messages into byte streams.

toString

public java.lang.String toString()
For diagnostic information, this method displays the current connection parameters.

Overrides:
toString in class java.lang.Object

getDeployID

public java.lang.String getDeployID()
Returns the string used to uniquely map each deployment request back to this ConfigManagerProxy connection. Most of the time the current userid is a sufficient deployID, as the field is only used to get back the correct log records related to each deployment.

Specified by:
getDeployID in interface ConfigManagerConnectionParameters
Returns:
String Deployment identifier

disableDomainAwareness

public void disableDomainAwareness()
Prevents Windows domain awareness support from initializing for this instance. If disabled, the userid will be obtained from the user.name property in the JVM. If required, this method must be called before ConfigManagerProxy.getInstance().


getUserID

public java.lang.String getUserID()
Crosses the JNI to return the correctly formatted MQSeries userId & domain. If domain awareness has been disabled, or if the LogonInfo classes or DLL could not be loaded, the value of the system property 'user.name' will be returned.

Specified by:
getUserID in interface ConfigManagerConnectionParameters
Returns:
String userId (and possibly domain, using '@' as a separator).

enableMQJavaClientTracing

public static final void enableMQJavaClientTracing(java.lang.String filename)
Sends level 5 WebSphere MQ Java Client tracing to the specified file.

Parameters:
filename - of the trace file

disableMQJavaClientTracing

public static final void disableMQJavaClientTracing()
Disables WebSphere MQ Java Client tracing


getSessionIDString

public java.lang.String getSessionIDString()
Returns a String representation of the session Id for this connection to the Configuration Manager.

Returns:
String representation of the session Id.

generateUniqueDeployID

public static java.lang.String generateUniqueDeployID()
Generates a deploy ID and returns it.

Returns:
String the generated deploy ID

getSupportedSSLCipherSuites

public static final java.lang.String[] getSupportedSSLCipherSuites()
Minimum set of supported SSL Cipher Suites

Returns:
String[] Supported SSL Cipher Suites