Methods Summary |
---|
public void | addActionToManagementRule(java.lang.String ruleName, java.lang.String actionMbeanName)Add Action element to maagement rule
ManagementRules rules = (ManagementRules)getBaseConfigBean();
ManagementRule rule = rules.getManagementRuleByName(ruleName);
Action action = new Action();
action.setActionMbeanName(actionMbeanName);
rule.setAction(action);
|
public javax.management.ObjectName | createManagementRule(java.lang.String ruleName, java.lang.Boolean bRuleEnabled, java.lang.String ruleDescription, java.lang.String eventType, java.lang.String eventLevel, java.lang.Boolean eventRecordEvent, java.lang.String eventDescription, java.util.Properties eventProperties, java.lang.String actionMbeanName)Create new self management rule with contained event and action(optional)
ManagementRule newRule = new ManagementRule();
//Rule attrs
newRule.setName(ruleName);
if(ruleDescription!=null)
newRule.setDescription(ruleDescription);
if(bRuleEnabled!=null)
newRule.setEnabled(bRuleEnabled.booleanValue());
//Event
Event event = new Event();
event.setType(eventType);
if(eventRecordEvent!=null)
event.setRecordEvent(eventRecordEvent.booleanValue());
if(eventLevel!=null)
event.setLevel(eventLevel);
if(eventDescription!=null)
event.setDescription(eventDescription);
//Event properties
if (null != eventProperties)
{
Enumeration keys = eventProperties.keys();
while (keys.hasMoreElements())
{
final String key = (String)keys.nextElement();
ElementProperty prop = new ElementProperty();
prop.setName(key);
prop.setValue((String)eventProperties.get(key));
event.addElementProperty(prop);
}
}
newRule.setEvent(event);
//Action
if(actionMbeanName!=null)
{
Action action = new Action();
action.setActionMbeanName(actionMbeanName);
newRule.setAction(action);
}
// insert new rule to config tree
ManagementRules rules = (ManagementRules)getBaseConfigBean();
rules.addManagementRule(newRule);
return ConfigMBeanHelper.getChildObjectName(super.m_registry, super.info, newRule);
|
public java.util.List | getAllActionMBeans(boolean enabled)Gets the registred actions in the domain.
return ManagementRulesMBeanHelper.getAllActionMBeans(enabled);
|
java.util.List | getAllNotificationEmitterMbeans(boolean enabled)Gets the registred custom mbeans which can be notification emitters.
return ManagementRulesMBeanHelper.getAllNotificationEmitterMbeans(enabled);
|
public java.util.List | getAttributes(java.lang.String dottedName) return null;
|
public java.util.List | getAttributes(javax.management.ObjectName objName)Gets the attributes for a given ObjectName.
return ManagementRulesMBeanHelper.getAttributes(objName);
|
public java.util.List | getDottedNames(java.lang.String dottedName) return null;
|
public java.util.List | getEventProperties(java.lang.String eventType)Gets the associated propertied for a given event.
return ManagementRulesMBeanHelper.getEventProperties(eventType);
|
public java.util.List | getEventPropertyValues(java.lang.String eventType, java.lang.String propertyName)Gets the possible values for a given event type and property name.
return ManagementRulesMBeanHelper.getEventPropertyValues(eventType, propertyName);
|
public java.util.List | getEventTypes(boolean isEE)Gets the list of event types.
return ManagementRulesMBeanHelper.getEventTypes(isEE);
|
public java.util.List | getMBeanAttributes(java.lang.String objectNameStr)Gets the attributes for a given ObjectName in a string form.
return ManagementRulesMBeanHelper.getMBeanAttributes(objectNameStr);
|
public java.util.List | getNotificationTypes(javax.management.ObjectName objName)Gets the Notifications for a given ObjectName.
return ManagementRulesMBeanHelper.getNotificationTypes(objName);
|
public java.util.List | getNotificationTypes(java.lang.String objectNameStr)Gets the notifications for a given ObjectName in a string form.
return ManagementRulesMBeanHelper.getNotificationTypes(objectNameStr);
|
public java.util.Set | getRegisteredMBeans(java.lang.String filter)Gets the registred MBeans registered in the server's MBean server.
return ManagementRulesMBeanHelper.getRegisteredMBeans(filter);
|