FileDocCategorySizeDatePackage
Rule.javaAPI DocGlassfish v2 API4152Tue Jul 24 22:50:48 BST 2007com.sun.enterprise.management.selfmanagement

Rule

public class Rule extends Object
Denotes the configured rule in the server instance. It abstracts all the Rule relevent information in it.
author
Pankaj Jairath

Fields Summary
static final int
ENABLED
One of the states of the rule
static final int
INACTIVE
static final int
DISABLED
static final int
NOACTION
private String
name
private String
description
private int
state
private com.sun.enterprise.admin.selfmanagement.event.Event
event
private Object
actionMBean
private boolean
isEnabled
Constructors Summary
Rule(String ruleName, String ruleDescription)
Creates a new instance of Rule

    
           
        
        name = ruleName;
        description  = ruleDescription;
    
Methods Summary
java.lang.ObjectgetAction()
Retrieves the Action associated with the Rule

        return actionMBean;
    
java.lang.StringgetDescription()
Retrieves the description of the configured rule

        return description;
    
com.sun.enterprise.admin.selfmanagement.event.EventgetEvent()
Retrieves the Event associated with the Rule

        return event;
    
java.lang.StringgetName()
Retrieves name of the configured rule

        return name;
    
intgetState()
Retrieves the current state of the configured Rule

        return state;
    
booleanisEnabled()
Provides the enabled status of the rule

        return isEnabled;
    
voidsetAction(java.lang.Object actionInstance)
Associates the Action with the configured Rule

        actionMBean = actionInstance;
    
voidsetEnabled(boolean status)
Set the enabled status

        isEnabled = status;
    
voidsetEvent(com.sun.enterprise.admin.selfmanagement.event.Event ruleEvent)
Associates the event with the Rule

        event = ruleEvent;
    
voidsetName(java.lang.String ruleName)
Sets the name of the configured Rule

        name = ruleName;
    
voidsetState(int ruleState)
Sets the current state of the configured Rule

        state = ruleState;