Fields specific to the managed resource

Admin_Parms
This field contains the resource characteristics that are required for the action.

Every resource has a set of unique characteristics. Each characteristic has a name, type and value, and the name of each is defined by a constant in the administration message. The name of the resource is a characteristic that is common to all managed resources. The name of the resource is held in the Admin_Name, and it has a type of ASCII.

The full set of characteristics of a resource can be determined by using the characteristics() method against an instance of an administration message. This method returns an MQeFields object that contains one field for each characteristic. MQeFields methods can be used for enumerating over the set of characteristics to obtain the name, type and default value of each characteristic.

The action requested determines the set of characteristics that can be passed to the action. In all cases, at least the name of the resource, Admin_Name, must be passed. In the case of Action_InquireAll this is the only parameter that is required.

The following code could be used to set the name of the resource to be managed in an administration message:
SetResourceName( MQeAdminMsg msg, String name )
{ 
  MQeFields parms;
  if ( msg.contains( Admin_Parms ) )
    parms = msg.getFields( Admin_Parms );
  else
    parms = new MQeFields(); 

  parms.putAscii( Admin_Name, name );
  msg.putFields( Admin_Parms, parms );
}
Alternatively, the code can be simplified by using the getInputFields() method to return the Admin_Parms field from the message, or setName() to set the Admin_Name field into the message. This is shown in the following code:
SetResourceName( MQeAdminMsg msg, String name )
{ 
  msg.SetName( name );
}

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.