IBM WebSphere Application ServerTM
Release 8

com.ibm.wsspi.management.metadata
Class ProfileActionProcessor

java.lang.Object
  extended by com.ibm.wsspi.management.metadata.ProfileActionProcessor

public class ProfileActionProcessor
extends java.lang.Object

This class is invoked by a thin java client class that is invoked by a profile action script to collect node metadata. The only method collectManagedMetadata() processes the command line options, creates a Collector Manager to collect metadata accordingly, and finally stores it in the local configuration repository.

Each note metadata collector implementation needs to provide the thin client class that instantiates the ProfileActionProcessor and invokes its method collectManagedObjectMetadata(). A sample code below shows such a thin java client.

 import com.ibm.wsspi.management.metadata.ProfileActionProcessor;
 public class WSFPCollectManagedObjectMetadata {
     private final static String TRACE_FILE_NAME = 
         "wsfpCollectManagedObjectMetadataTrace.log";

     public WSFPCollectManagedObjectMetadata() {}
 
     public static void main(String[] args) throws Exception {

         ProfileActionProcessor paProcessor = new ProfileActionProcessor( 
             WSFPManagedObjectMetadataCollectorImpl.ACTION_PARAM_PROFILE_TYPE,
             WSFPManagedObjectMetadataCollectorImpl.EXTENSION_ID,
             WSFWSFPagedObjectMetadataCollectorImpl.PROFILE_TYPES,
             TRACE_FILE_NAME);

         paProcessor.collectManagedObjectMetadata(args);
     }
 }
 

for the definition on the string contants referenced in the sample code above, please see the documentation of com.ibm.wsspi.management.metadata.ManagedObjectMetadataCollectorImplBase.

See Also:
ManagedObjectMetadataCollectorImplBase

Constructor Summary
ProfileActionProcessor(java.lang.String actionParamProfileType, java.lang.String extensionID, java.lang.String[] profileType, java.lang.String traceFileName)
          Constructs a ProfileActionProcessor.
 
Method Summary
 void collectManagedObjectMetadata(java.lang.String[] args)
          This method creates a Collector Manager to collect metadata and store it in the local configuration repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileActionProcessor

public ProfileActionProcessor(java.lang.String actionParamProfileType,
                              java.lang.String extensionID,
                              java.lang.String[] profileType,
                              java.lang.String traceFileName)
Constructs a ProfileActionProcessor.

Parameters:
actionParamProfileType - ProfileType property name; should not be null or empty.
extensionID - identifying a metadata collector extension being added or removed; should not be null or empty.
profileType - array of valid profile types to be created or augmented; should not be null or empty.
traceFileName - name of the trace file used when the trace turns on; should not be null or empty.
Method Detail

collectManagedObjectMetadata

public void collectManagedObjectMetadata(java.lang.String[] args)
                                  throws java.lang.Exception
This method creates a Collector Manager to collect metadata and store it in the local configuration repository. Since the Deployment Manager does not have to be running when this method is invoked, there is no attempt to send the metadata to the Deployment Manager. The Collector Manager is invoked with a null Deployment Manager AdminClient reference so that the Collector Manager will not try to send the collected metadata to the Deployment Manager. The node agent will send the metadata the Deployment Manager when the node agent discovers it any time after the node agent is started.

The optional "-add" parameter can be used to perform a profile augmentation action which will cause the product short name, the product version number, and the the metadata property, com.ibm.websphere.deployed.features, to be set for the WAS feature pack or stack product. With this option, the node metadata collection on a profile is also run.

The optional "-remove" parameter can be used to perform a profile unaugmentation action which will cause the product short name, the product version number, and the the metadata property, com.ibm.websphere.deployed.features, to be removed for the WAS feature pack or stack product. There is no node metadata collection runs after the data being removed.

The three profile types which have deployed features associated with them are "dmgr", "managed" and "default". These values relate to the profile templates of the same names. The "dmgr" profile type is for a Deployment Manager profile, "managed" profile type is for a managed node profile in federated cell, and "default" is for a standalone cell profile.

To help with debugging, the option -traceString is also recognized. The syntax for this option is "-traceString []". If no string string is specified, "com.ibm.*=all=enabled" is used.

Parameters:
args - command options used to locate metadata and the trace collection.
Throws:
java.lang.Exception

IBM WebSphere Application ServerTM
Release 8