|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This MBean is responsible for applying JMX Monitors to agents based on
MonitorPolicy
s added to this MBean. Policies are added/removed using the
addMonitorPolicy
, removeMonitorPolicy
methods. Once
MonitorPolicy objects have been added, they can then be mapped or unmapped to a device
type or a specific device using oneof the registerMonitor()
or
deregisterMonitor()
methods. When a device is discovered, any applicable
policies and their corresponding Monitors will be applied.
The ObjectName
of this MBean includes the following attributes, in addition to the SIF
attribute of DeviceID
:
This management interface includes the following attributes. These attributes are described in more detail in the accessor methods.
The following operations are included in this management interface. These are described in more detail in the corresponding method documentation.
This MBean emits no Notification
s, although each instantiated
Monitor
will emit MonitorNotification
s.
Field Summary | |
---|---|
static java.lang.String |
OBJECT_NAME
|
static java.lang.String |
SYS_PROP_MONITOR_POLICY_STORE_CLASSNAME
Property specifying the class name to use for storing monitor policies |
Method Summary | |
---|---|
boolean |
addMonitorPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
Adds a MonitorPolicy from the registry. |
boolean |
containsPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
Returns true if the supplied MonitorPolicy has been added,
otherwise false . |
boolean |
containsPolicy(java.lang.String policyId)
Returns true if a policy matching the supplied identifier has been added,
otherwise false . |
void |
deregisterAllMonitors()
Removes all monitor registrations for all policies |
boolean |
deregisterMonitor(MonitorPolicyAction action)
Removes the registration for the supplied MonitorPolicyAction , and, if the action
was enabled, unregisters any created MonitorMBean s. |
com.ibm.retail.si.mgmt.monitor.MonitorPolicy[] |
getAllMonitorPolicies()
Return an array of all stored monitor policies. |
MonitorPolicyAction[] |
getAllMonitorPolicyActions()
Return an array of all stored monitor policy actions. |
com.ibm.retail.si.mgmt.monitor.MonitorPolicy |
getMonitorPolicy(java.lang.String policyId)
Retrieves the MonitorPolicy matching the supplied policy identifier,
or null if it cannot be found. |
MonitorPolicyAction[] |
getMonitorPolicyActions(java.lang.String policyId)
Retrieves all MonitorPolicyAction associated with a matching the supplied policy identifier,
or null if it cannot be found. |
void |
initialize()
Initializes the MonitorManager. |
boolean |
isMonitorRegistered(MonitorPolicyAction action)
Returns whether or not the supplied MonitorPolicyAction is registered |
boolean |
registerMonitor(MonitorPolicyAction action)
Registers the supplied MonitorPolicyAction and, if the action is enabled,
applies it to all active and newly discovered devices that match the MonitorPolicyAction 's
target identifier (device type, device id, or system id). |
void |
removeAllPolicies()
Removes all MonitorPolicy objects and any registrations |
com.ibm.retail.si.mgmt.monitor.MonitorPolicy |
removeMonitorPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
Removes the MonitorPolicy object equal to that supplied, plus
any registrations of those policies. |
com.ibm.retail.si.mgmt.monitor.MonitorPolicy |
removeMonitorPolicy(java.lang.String policyId)
Removes the MonitorPolicy matching the supplied policy identifier, and any
registrations of that policy. |
void |
shutdown()
Shutdown the MBean, attempting to save currently stored policies in persistent storage |
Field Detail |
public static final java.lang.String OBJECT_NAME
public static final java.lang.String SYS_PROP_MONITOR_POLICY_STORE_CLASSNAME
MonitorPolicyRegistry
,
Constant Field ValuesMethod Detail |
public void initialize() throws MgmtException
MgmtException
- Error initializing the MBeanpublic void shutdown()
public boolean addMonitorPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
MonitorPolicy
from the registry. Returns true
if the policy
was added, or false
if the policy has already been added.
policy
- MonitorPolicy to add
public com.ibm.retail.si.mgmt.monitor.MonitorPolicy removeMonitorPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
MonitorPolicy
object equal to that supplied, plus
any registrations of those policies. This method returns the MonitorPolicy
removed or null if it was not removed.
policy
- MonitorPolicy to remove
public com.ibm.retail.si.mgmt.monitor.MonitorPolicy removeMonitorPolicy(java.lang.String policyId)
MonitorPolicy
matching the supplied policy identifier, and any
registrations of that policy. This method returns the MonitorPolicy
removed,
or null if it was not removed.
policyId
- Identifier of the MonitorPolicy to remove
public void removeAllPolicies()
MonitorPolicy
objects and any registrations
public boolean containsPolicy(com.ibm.retail.si.mgmt.monitor.MonitorPolicy policy)
true
if the supplied MonitorPolicy
has been added,
otherwise false
.
policy
- MonitorPolicy to search for
false
otherwise.public boolean containsPolicy(java.lang.String policyId)
true
if a policy matching the supplied identifier has been added,
otherwise false
.
policyId
- MonitorPolicy identifier to search for
false
otherwise.public com.ibm.retail.si.mgmt.monitor.MonitorPolicy getMonitorPolicy(java.lang.String policyId)
MonitorPolicy
matching the supplied policy identifier,
or null
if it cannot be found.
policyId
- Policy identifier of the MonitorPolicy
to retrieve
MonitorPolicy
matching the supplied policy identifier, or null if
it cannot be found.public com.ibm.retail.si.mgmt.monitor.MonitorPolicy[] getAllMonitorPolicies()
public boolean registerMonitor(MonitorPolicyAction action) throws MgmtException
MonitorPolicyAction
and, if the action is enabled,
applies it to all active and newly discovered devices that match the MonitorPolicyAction
's
target identifier (device type, device id, or system id).
action
- The MonitorPolicyAction to register
true
if the registration was added and applied successfully, or false
if a registration for the supplied action already exists.
MgmtException
com.ibm.retail.si.mgmt.monitor.MonitorPolicyAction
public void deregisterAllMonitors()
public boolean deregisterMonitor(MonitorPolicyAction action) throws MgmtException
MonitorPolicyAction
, and, if the action
was enabled, unregisters any created MonitorMBean
s.
action
- The MonitorPolicyAction to deregister
true
if the action was deregistered successfully, false
otherwise
MgmtException
- Error unregistering the general agent's MonitorMBeanpublic MonitorPolicyAction[] getAllMonitorPolicyActions()
public MonitorPolicyAction[] getMonitorPolicyActions(java.lang.String policyId)
MonitorPolicyAction
associated with a matching the supplied policy identifier,
or null
if it cannot be found.
policyId
- Policy identifier of the MonitorPolicy
to retrieve
MonitorPolicyAction[]
containing all actions whose policy matches
the supplied policy identifier, or an empty array if none can be found.public boolean isMonitorRegistered(MonitorPolicyAction action)
MonitorPolicyAction
is registered
action
- MonitorPolicyAction to search for
true
if the supplied action is registered, false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |