MQEnvironment.NET class

Use MQEnvironment to control how the MQQueueManager constructor is called and to select an IBM® MQ MQI client connection. The MQEnvironment class contains properties that control the behavior of the IBM MQ.

Class


System.Object
        |
        └─ IBM.WMQ.MQEnvironment
public class IBM.WMQ.MQEnvironment extends System.Object;

Properties - client only

Test for MQException being thrown when getting properties.

public static int CertificateValPolicy {get; set;}
Set which TLS certificate validation policy is used to validate digital certificates received from remote partner systems. Valid values are:
  • MQC.CERTIFICATE_VALIDATION_POLICY_ANY
  • MQC.CERTIFICATE_VALIDATION_POLICY_RFC5280
public static ArrayList EncryptionPolicySuiteB {get; set;}
Set the level of Suite B compliant cryptography. Valid values are:
  • MQC.MQ_SUITE_B_NONE - This is the default value.
  • MQC.MQ_SUITE_B_128_BIT
  • MQC.MQ_SUITE_B_192_BIT
public static string Channel {get; set;}
The name of the channel to connect to the target queue manager. You must set the channel property before instantiating an MQQueueManager instance in client mode.
public static int FipsRequired {get; set;}

Specify MQC.MQSSL_FIPS_YES to use only FIPS-certified algorithms if cryptography is carried out in IBM MQ. The default is MQC.MQSSL_FIPS_NO.

If cryptographic hardware is configured, the cryptographic modules used are those provided by the hardware product. Depending on the hardware in use, these might not be FIPS-certified to a particular level.

public static string Hostname {get; set;}
The TCP/IP host name of the computer on which the IBM MQ server resides. If the host name is not set, and no overriding properties are set, server bindings mode is used to connect to the local queue manager.
public static int Port {get; set;}
The port to connect to. This is the port on which the IBM MQ server is listening for incoming connection requests. The default value is 1414.
public static string SSLCipherSpec {get; set;}
Set SSLCipherSpec to the value of the CipherSpec set on the SVRCONN channel to enable TLS for the connection. The default is Null, and TLS is not enabled for the connection.
public static string sslPeerName {get; set;}

A distinguished name pattern. If sslCipherSpec is set, this variable can be used to ensure that the correct queue manager is used. If set to null (default), the DN of the queue manager is not performed. sslPeerName is ignored if sslCipherSpec is null.

Properties

Test for MQException being thrown when getting properties.

public static ArrayList HdrCompList {get; set;}
Header Data Compression List
public static int KeyResetCount {get; set;}
Indicates the number of unencrypted bytes sent and received within an TLS conversation before the secret key is renegotiated.
public static ArrayList MQAIRArray {get; set;}
An array of MQAuthenticationInformationRecord objects.
public static ArrayList MsgCompList {get; set;}
Message Data Compression List
public static string Password {get; set;}
The password to be authenticated. The password referenced from the MQCSP structure gets populated by setting this Password property.
public static string ReceiveExit {get; set;}
A receive exit allows you to examine and alter data received from a queue manager. It is normally used with a corresponding send exit at the queue manager. If ReceiveExit is set to null, no receive exit is called.
public static string ReceiveUserData {get; set;}
The user data associated with a receive exit. Limited to 32 characters.
public static string SecurityExit {get; set;}
A security exit allows you to customize the security flows that occur when an attempt is made to connect to a queue manager. If SecurityExit is set to null, no security exit is called.
public static string SecurityUserData {get; set;}
The user data associated with a security exit. Limited to 32 characters.
public static string SendExit {get; set;}
A send exit allows you to examine or alter the data sent to a queue manager. It is normally used with a corresponding receive exit at the queue manager. If SendExit is set to null, no send exit is called.
public static string SendUserData {get; set;}
The user data associated with a send exit. Limited to 32 characters.
public static string SharingConversations {get; set;}

The SharingConversations field is used on connections from .NET applications, when these applications are not using a client channel definition table (CCDT).

SharingConversations determines the maximum number of conversations that can be shared on a socket associated with this connection.

A value of 0 means that the channel operates as it did before IBM WebSphere® MQ 7.0, with regard to conversation sharing, read ahead, and heartbeat.

The field is passed in the hash table of properties as a SHARING_CONVERSATIONS_PROPERTY, when instantiating an IBM MQ queue manager.

If you do not specify SharingConversations, a default value of 10 is used.

public static string SSLCryptoHardware {get; set;}

Sets the name of the parameter string required to configure the cryptographic hardware present on the system. SSLCryptoHardware is ignored if sslCipherSpec is null.

public static string SSLKeyRepository {get; set;}

Set the fully qualified file name of the key repository.

If SSLKeyRepository is set to null (default), the certificate MQSSLKEYR environment variable is used to locate the key repository. SSLCryptoHardware is ignored if sslCipherSpec is null.

Note: The .kdb extension is a mandatory part of the file name, but is not included as part of the value of the parameter. The directory you specify must exist. IBM MQ creates the file the first time it accesses the new key repository, unless the file already exists.
public static string UserId {get; set;}

The user ID to be authenticated. The user ID referenced from the MQCSP structure gets populated by setting UserId. Authenticate UserId using an API or Security exit.

Constructors

public MQEnvironment()