org.objectweb.fractal.jmx.agent
Class AgentContext

java.lang.Object
  extended byorg.objectweb.fractal.jmx.agent.AgentContext

public class AgentContext
extends Object

The context of the agent component (handles patterns and monitors).

Version:
0.1

Constructor Summary
AgentContext()
           
 
Method Summary
 AgentMonitorMBean[] getMonitors()
          returns the current monitors.
 boolean matchItfPatterns(ObjectName oName)
          Checks if an ObjectName matches the current patterns for filtering component interface MBeans.
 boolean matchMonitorPatterns(ObjectName oName)
          Checks if an ObjectName matches the current patterns for filtering monitor MBeans.
 void reset(String fc, String str, String counter, String gauge, String periodic)
          Resets this agent context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentContext

public AgentContext()
Method Detail

getMonitors

public AgentMonitorMBean[] getMonitors()
returns the current monitors.

Returns:
the current monitors.

matchItfPatterns

public boolean matchItfPatterns(ObjectName oName)
Checks if an ObjectName matches the current patterns for filtering component interface MBeans.

Parameters:
oName - the ObjectName to check.
Returns:
true if it matches, false otherwhise.

matchMonitorPatterns

public boolean matchMonitorPatterns(ObjectName oName)
Checks if an ObjectName matches the current patterns for filtering monitor MBeans.

Parameters:
oName - the ObjectName to check.
Returns:
true if it matches, false otherwhise.

reset

public void reset(String fc,
                  String str,
                  String counter,
                  String gauge,
                  String periodic)
           throws JMException
Resets this agent context.

This method translates the agent attributes, in their corresponding ObjectName patterns and monitors.

Parameters:
fc - the agent attribute for filtering component interface MBeans.
str - the agent attribute for filtering string monitor MBeans.
counter - the agent attribute for filtering counter monitor MBeans.
gauge - the agent attribute for filtering gauge monitor MBeans.
periodic - the agent attribute for filtering gauge monitor MBeans.
Throws:
JMException - if a problem occurs during the translation.