org.licas.autonomic

## Class AM_PlanDefault

- java.lang.Object
- - org.licas.autonomic.AM_Module
  - - org.licas.autonomic.AM_PlanDefault

-     public class AM_PlanDefault
      extends AM_Module

  This class is an example of a default autonomic manager planner, but does not process anything as default. It needs to be managed by a policy script. This still needs to be completed.
  Author:
    Kieran Greer

- - ### Field Summary

    - ### Fields inherited from class org.licas.autonomic.AM_Module

      `adminKey, autoEngine, autoMan, evaluationMessage, passwordHandler, policy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AM_PlanDefault(Service serviceObj, PasswordHandler passwordHandler)` Create a new instance of AM_PlanDefault.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.ArrayList<KeyValue>` | `process(MessageInfo messageInfo)` Process the data and return the result.

    - ### Methods inherited from class org.licas.autonomic.AM_Module

      `evaluationMessage, setAutonomicManager, setPolicy`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AM_PlanDefault

          public AM_PlanDefault(Service serviceObj,
                                PasswordHandler passwordHandler)

      Create a new instance of AM_PlanDefault. You can only use the `AutoEngine` if the `AutonomicManager` wraps a licas `Service`-derived object.
      Parameters:
        `serviceObj` - the service object wrapped by the autonomic manager.
        `passwordHandler` - the service's password handler, for the auto script engine.

  - ### Method Detail

    - #### process

          protected java.util.ArrayList<KeyValue> process(MessageInfo messageInfo)
                                                   throws java.lang.Exception

      Process the data and return the result. this default version will evaluate the message, using any declared default method, to determine if it matches with the policy. As this is only one monitoring implementation version, it is possible that you will need to override this method to implement a more application-specific one, but it will provide some flexibility, as it can be configured through the `setEventRuleAction` method, for example.
      Specified by:
        `process` in class `AM_Module`
      Parameters:
        `messageInfo` - the message to evaluate.
      Returns:
        the result of the monitoring. Note that this should not change the input message and is a list of actions to carry out in sequence. Each action is a list of `KeyValue` objects that can include a `Const`.`REPLY` object and `AiConst`.`EFFECTOR` method XML description, or other objects. These are typically all included with each action message, where they have to be identified by the related key value.
      Throws:
        `java.lang.Exception` - any error.