Websphere MQ Everyplace

com.ibm.mqe
Class MQeProperties

java.lang.Object
  |
  +--com.ibm.mqe.MQeProperties
All Implemented Interfaces:
MQePropertyProvider

public final class MQeProperties
extends java.lang.Object
implements MQePropertyProvider

This class provides an implementation of the MQePropertyProvider interface It is used to pass parameters into the system, where the nature of the parameters is unknown to intermediate classes in MQe. An example of this is when passing parameters to the adapter to be used by a listener. The parameter set contains different parameters for a TCP/IP adapter to those for an infra red adapter. The MQeAdministrator interface should not need to know about these differences, and so the property provider is used as a generalised parameter passing mechanism. Parameters are passed as name/value pairs, where the name and the value are both represented as instances of java.lang.String. Property values are retrieved by name.


Field Summary
static short[] version
          MQe Version.
 
Constructor Summary
MQeProperties()
          Default constructor.
MQeProperties(MQeFields mqeFields)
          Construct from MQe fields.
 
Method Summary
static java.lang.String getGlobalProperty(java.lang.String key)
          Retrieve a value from the MQe global property table.
static java.util.Enumeration getGlobalPropertyNames()
          Retreive an enumeration of the names of the properties stored in the receiver.
 java.lang.String getProperty(java.lang.String key)
          Retrieve a value from the receiver.
 java.util.Enumeration getPropertyNames()
          Retreive an enumeration of the names of the properties stored in the receiver.
static void setGlobalProperty(java.lang.String key, java.lang.String value)
          Set the value of a MQe global property.
 void setProperty(java.lang.String key, java.lang.String value)
          Set the value of a property.
 MQeFields toMQeFields()
          Convert the receivers specific properties (not the global ones) to an MQeFields representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
MQe Version. Do not publish.

Constructor Detail

MQeProperties

public MQeProperties()
Default constructor.


MQeProperties

public MQeProperties(MQeFields mqeFields)
Construct from MQe fields. All Unicode fields will be assumed to be name/value pairs and added to the new Properties list (ignore if value is null)

Method Detail

getGlobalProperty

public static final java.lang.String getGlobalProperty(java.lang.String key)
Retrieve a value from the MQe global property table. If no property has been specifically set in the receiver, then the value will be retrieved from the System properties.

Parameters:
key - (java.lang.String) the name of the property value to retrieve
Returns:
(java.lang.String) the value of the property, or null if none set.

setGlobalProperty

public static final void setGlobalProperty(java.lang.String key,
                                           java.lang.String value)
Set the value of a MQe global property.

Parameters:
key - (java.lang.String) the name of the property value to set
value - (java.lang.String) the property value to set
Returns:
void

getGlobalPropertyNames

public static final java.util.Enumeration getGlobalPropertyNames()
Retreive an enumeration of the names of the properties stored in the receiver.

Returns:
(java.util.Enumeration) an enumeration of the names of the properties specifically set in the global MQe properties instance (System propeties are not listed).

getProperty

public final java.lang.String getProperty(java.lang.String key)
Retrieve a value from the receiver. Fulfils contract implied by implementation of MQePropertyProvider interface.

Specified by:
getProperty in interface MQePropertyProvider
Parameters:
key - (java.lang.String) the name of the property value to retrieve
Returns:
(java.lang.String) the value of the property, or null if none set.
See Also:
If no property has been specifically set in the receiver, then the value will be retrieved from the MQe global properties.

setProperty

public final void setProperty(java.lang.String key,
                              java.lang.String value)
Set the value of a property.

Parameters:
key - (java.lang.String) the name of the property value to set
value - (java.lang.String) the property value to set
Returns:
void

getPropertyNames

public final java.util.Enumeration getPropertyNames()
Retreive an enumeration of the names of the properties stored in the receiver.

Returns:
(java.util.Enumeration) an enumeration of the names of the properties specifically set in this instance (System propeties are not listed).

toMQeFields

public final MQeFields toMQeFields()
Convert the receivers specific properties (not the global ones) to an MQeFields representation. The fields representation will have a Unicode field for each property, where the field name is the property name, and the value is the property value.

Returns:
com.ibm.mqe.MQeFields

Websphere MQ Everyplace