Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.config.proxy.MQPropertyFileConfigManagerConnectionParameters

java.lang.Object
        com.ibm.broker.config.proxy.MQPropertyFileConfigManagerConnectionParameters

public class MQPropertyFileConfigManagerConnectionParameters
implements ConfigManagerConnectionParameters
extends Object

Provides the connection parameters to a Configuration Manager by reading a properties file that contains the hostname, queue manager, port and security exit information. The class is able to parse *.configmgr files (as created in the toolkit) as well as the mqsicfgutil.ini format.

There are two ways of connecting to a Configuration Manager using this class. The preferred method is by specifying the location of a *.configmgr file:

     ConfigManagerConnectionParameters cmcp = new
         MQPropertyFileConfigManagerConnectionParameters("cm1.configmgr");
     ConfigManagerProxy.getInstance(cmcp);
 
However, the empty constructor may also be used, which will attempt to connect to a Configuration Manager using the information in the file mqsicfgutil.ini. This method is not recommended for new applications.
    ConfigManagerProxy.getInstance(
        new MQPropertyFileConfigManagerConnectionParameters() );
 

NOTE: As the .configmgr file is XML, an XML parser is needs to be available on the CLASSPATH in order to load such a file. Configuration Manager Proxy applications using a v1.3-based JRE will need to manually add such a parser to the CLASSPATH in order to use this class.

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

Responsibilities Represents a set of connection parameters to a WebSphere MQ based Configuration Manager.
Collaborators MQConfigManagerConnectionParameters


 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 25103.7  2004-03-24  HDMPL           v6 Release

 

Constructor Index
Constructor Description
MQPropertyFileConfigManagerConnectionParameters() Constructs a new instance that refers to connection properties in the file 'mqsicfgutil.ini' in the JRE's current directory.
MQPropertyFileConfigManagerConnectionParameters(String) Constructs a new instance that refers to connection properties in the file with the supplied fully qualified name.
Method Index
Method Description
void disableDomainAwareness() Prevents Windows domain awareness support from initializing for this instance.
void disableMQJavaClientTracing() Disables WebSphere MQ Java Client tracing
void enableMQJavaClientTracing(String) Sends level 5 WebSphere MQ Java Client tracing to the specified file.
String generateUniqueDeployID() Sets the deploy ID for the current connection to a unique String and returns it.
String getDeployID() Returns the string used to uniquely map each deployment request back to this ConfigManagerProxy connection.
String getHostname() Returns the Configuration Manager's IP address or host name as stored in the properties file.
int getPort() Returns the Configuration Manager's port as stored in the properties file.
CommsMessageSerializer getProtocol() This method is required by the Configuration Manager Proxy and should not be called by user applications.
String getQueueManager() Returns the Configuration Manager's queue manager as stored in the properties file.
Receiver getReceiver() This method is required by the Configuration Manager Proxy and should not be called by user applications.
String getSecExit() Returns the Configuration Manager's security exit as stored in the properties file.
Sender getSender() This method is required by the Configuration Manager Proxy and should not be called by user applications.
String getSessionIDString() Returns a String representation of the Session ID for this MQ Connection.
String getSSLCipherSuite() Returns the Configuration Manager's SSL cipher suite as stored in the properties file.
String getSSLCRLLDAPList() Returns the Configuration Manager's SSL CRL LDAP list as stored in the properties file.
String getSSLKeyStore() Returns the Configuration Manager's SSL key store as stored in the properties file.
String getSSLPeerName() Returns the Configuration Manager's SSL peer name as stored in the properties file.
String getSSLTrustStore() Returns the Configuration Manager's SSL trust store as stored in the properties file.
String getUserID() Crosses the JNI to return the correctly formatted MQSeries userId & domain.
void setAdvancedConnectionParameters(String, String, String, int, int, String, byte[]) Sets the 'advanced' options for a connection to MQ.
String toString() For diagnostic information, this method displays the current connection parameters.

Constructors

MQPropertyFileConfigManagerConnectionParameters

public MQPropertyFileConfigManagerConnectionParameters() 

Constructs a new instance that refers to connection properties in the file 'mqsicfgutil.ini' in the JRE's current directory. If the file cannot be read for whatever reason, the call to ConfigManagerProxy.getInstance() will throw a ConfigManagerProxyLoggedException.

MQPropertyFileConfigManagerConnectionParameters

public MQPropertyFileConfigManagerConnectionParameters(String filename) 

Constructs a new instance that refers to connection properties in the file with the supplied fully qualified name. If the file cannot be read for whatever reason, the call to ConfigManagerProxy.getInstance() will throw a ConfigManagerProxyLoggedException.

Methods

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().

disableMQJavaClientTracing

public static final void disableMQJavaClientTracing() 

Disables WebSphere MQ Java Client tracing

enableMQJavaClientTracing

public static final void enableMQJavaClientTracing(String filename) 

Sends level 5 WebSphere MQ Java Client tracing to the specified file.

generateUniqueDeployID

public String generateUniqueDeployID() 

Sets the deploy ID for the current connection to a unique String and returns it.

getDeployID

public 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.

getHostname

public String getHostname() 

Returns the Configuration Manager's IP address or host name as stored in the properties file.

getPort

public int getPort() 

Returns the Configuration Manager's port as stored in the properties file. If no port was specified, the default value of 1414 will be returned.

getProtocol

public 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.

getQueueManager

public String getQueueManager() 

Returns the Configuration Manager's queue manager as stored in the properties file.

getReceiver

public 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.

getSecExit

public String getSecExit() 

Returns the Configuration Manager's security exit as stored in the properties file. If no security exit is defined, null or the empty string is returned.

getSender

public 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.

getSessionIDString

public String getSessionIDString() 

Returns a String representation of the Session ID for this MQ Connection.

getSSLCipherSuite

public String getSSLCipherSuite() 

Returns the Configuration Manager's SSL cipher suite as stored in the properties file. If this parameter is not defined for this connection, null or the empty string is returned.

getSSLCRLLDAPList

public String getSSLCRLLDAPList() 

Returns the Configuration Manager's SSL CRL LDAP list as stored in the properties file. If this parameter is not defined for this connection, null or the empty string is returned.

getSSLKeyStore

public String getSSLKeyStore() 

Returns the Configuration Manager's SSL key store as stored in the properties file. If this parameter is not defined for this connection, null or the empty string is returned.

getSSLPeerName

public String getSSLPeerName() 

Returns the Configuration Manager's SSL peer name as stored in the properties file. If this parameter is not defined for this connection, null or the empty string is returned.

getSSLTrustStore

public String getSSLTrustStore() 

Returns the Configuration Manager's SSL trust store as stored in the properties file. If this parameter is not defined for this connection, null or the empty string is returned.

getUserID

public 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.

setAdvancedConnectionParameters

public void setAdvancedConnectionParameters(String channelName,
                                            String requestQueueName,
                                            String responseQueueName,
                                            int maxRetries,
                                            int retryWaitMillis,
                                            String deployID,
                                            byte[] sessionID) 

Sets the 'advanced' options for a connection to MQ.

toString

public String toString() 

For diagnostic information, this method displays the current connection parameters.

Class Hierarchy All Classes All Fields and Methods