|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.fractal.jmx.agent.Agent
A component representing the JMX agent level.
This component encapsulates a JMX MBeanServer
and
allows MBean manipulation by implementing the Admin
interface for registering MBeans,
and the AdminAttributes
interface for filtering MBeans.
Where the MBeans represent component server interfaces or JMX
monitors
for observing component attributes.
The binding controller part of this component sets the [required] listener component
that handles JMX notifications sent out by the monitors
.
The life-cycle controller part bootstraps this component by registering two MBeans representing
its Admin
and AdminAttributes
interfaces.
These two interfaces are identified respectively in the agent by the ObjectName
:
Agent:itf=admin Agent:itf=attribute-controller
The naming convention used for the MBeans representing component server interfaces is defined in Admin
.
The monitors
are identified by the ObjectName
:
AgentService:type=monitorType,monitor=index[,attributeType=attType]where:
AdminAttributes
interface.
Field Summary |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
Agent()
|
Method Summary | |
void |
bindFc(String itfName,
Object itfValue)
|
void |
expose()
Registers MBeans in the agent. |
String |
getFcState()
|
String |
getItfPatterns()
Returns the patterns for filtering components interface MBeans. |
String |
getMonitorCounterPatterns()
Returns the patterns for filtering counter monitor MBeans. |
String |
getMonitorGaugePatterns()
Returns the patterns for filtering gauge monitor MBeans. |
String |
getMonitorPeriodicPatterns()
Returns the patterns for filtering periodic monitor MBeans. |
String |
getMonitorStringPatterns()
Returns the patterns for filtering string monitor MBeans. |
MBeanServer |
getRawMBeanServer()
Returns the underlying MBeanServer used by the agent.
|
String[] |
listFc()
|
Object |
lookupFc(String itfName)
|
void |
setItfPatterns(String str)
Sets the patterns for filtering components interface MBeans. |
void |
setMonitorCounterPatterns(String counters)
Sets the patterns for filtering counter monitor MBeans.
|
void |
setMonitorGaugePatterns(String gauges)
Sets the patterns for filtering gauge monitor MBeans.
|
void |
setMonitorPeriodicPatterns(String periodic)
Sets the patterns for filtering periodic monitor MBeans.
|
void |
setMonitorStringPatterns(String str)
Sets the patterns for filtering string monitor MBeans.
|
void |
setRawMBeanServer(MBeanServer srv)
Sets the underlying MBeanServer used by the agent.
|
void |
startFc()
|
void |
stopFc()
|
void |
unbindFc(String itfName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Agent()
Method Detail |
public String[] listFc()
listFc
in interface BindingController
public Object lookupFc(String itfName)
lookupFc
in interface BindingController
public void bindFc(String itfName, Object itfValue)
bindFc
in interface BindingController
public void unbindFc(String itfName)
unbindFc
in interface BindingController
public String getFcState()
getFcState
in interface LifeCycleController
public void startFc()
startFc
in interface LifeCycleController
public void stopFc()
stopFc
in interface LifeCycleController
public String getItfPatterns()
AdminAttributes
getItfPatterns
in interface AdminAttributes
AdminAttributes.setItfPatterns(java.lang.String)
public void setItfPatterns(String str)
AdminAttributes
ObjectName
matches one of these patterns,
can be registered in the agent.
The syntax of this filter is defined to equal a sequence of (";" separated) string representations of
ObjectName
patterns.
For example:
*:itf=attribute-controller,*;*/Foo/*:*represents two patterns that can match respectively:
setItfPatterns
in interface AdminAttributes
str
- the patterns for filtering components interface MBeans.public String getMonitorStringPatterns()
AdminAttributes
string monitor
MBeans.
getMonitorStringPatterns
in interface AdminAttributes
string monitor
MBeans.AdminAttributes.setMonitorStringPatterns(java.lang.String)
public void setMonitorStringPatterns(String str)
AdminAttributes
string monitor
MBeans.
Any getter of type string, specified in a component interface whose
ObjectName
matches one of these patterns,
can be observed by a string monitor
.
The syntax of this filter is defined to equal a sequence of (";" separated) string representations of
ObjectName
patterns. Where the following properties are
reserved for the configuration of a string monitor
(as defined in the JMX specification):
For example:
*:itf=attribute-controller,observedAttribute=Foo,granularityPeriod=5000, stringToCompare=fooval,notifyDiffer=true,notifyMatch=true,*represents a pattern that can match the attribute controller interface of any component, if this interface specifies a string attribute "Foo". This attribute will be monitored every 5000 ms and compared with the value "fooval". As defined in the JMX specification:
match notification
is sent when the value of the attribute "Foo" first matches the value "fooval".
Subsequent matchings of "fooval" do not cause further notifications unless the attribute value
differs from "fooval".differ notification
is sent when the value of the attribute "Foo" first differs from the value "fooval".
Subsequent differences from "fooval" do not cause further notifications unless the attribute value
matches "fooval".
setMonitorStringPatterns
in interface AdminAttributes
str
- the patterns for filtering string monitor
MBeans.public String getMonitorCounterPatterns()
AdminAttributes
counter monitor
MBeans.
getMonitorCounterPatterns
in interface AdminAttributes
counter monitor
MBeans.AdminAttributes.setMonitorCounterPatterns(java.lang.String)
public void setMonitorCounterPatterns(String counters)
AdminAttributes
counter monitor
MBeans.
Any getter of type integer (Byte, Integer, Short, Long),
specified in a component interface whose
ObjectName
matches one of these patterns,
can be observed by a counter monitor
.
The syntax of this filter is defined to equal a sequence of (";" separated) string representations of
ObjectName
patterns. Where the following properties are
reserved for the configuration of a counter monitor
(as defined in the JMX specification):
For example:
*:itf=stat-controller,observedAttribute=NumberOfMethodCall,granularityPeriod=5000, initThreshold=2,modulus=0,offset=10,differenceMode=false,*represents a pattern that can match the interface "stat-controller" of any component, if this interface specifies an integer attribute named "NumberOfMethodCall". This attribute will be monitored every 5000 ms.
Threshold notifications
are sent, as defined in the JMX specification for a
counter monitor
configured with:
InitThreshold=2, Modulus=0, Offset=10 and DifferenceMode=false
(by default Notify=true).
setMonitorCounterPatterns
in interface AdminAttributes
counters
- the patterns for filtering
counter monitor
MBeans.public String getMonitorGaugePatterns()
AdminAttributes
gauge monitor
MBeans.
getMonitorGaugePatterns
in interface AdminAttributes
gauge monitor
MBeans.AdminAttributes.setMonitorGaugePatterns(java.lang.String)
public void setMonitorGaugePatterns(String gauges)
AdminAttributes
gauge monitor
MBeans.
Any getter of type integer or floating-point (Byte, Integer, Short,
Long, Float, Double), specified in a component interface whose
ObjectName
matches one of these patterns,
can be observed by a gauge monitor
.
The syntax of this filter is defined to equal a sequence of (";" separated) string representations of
ObjectName
patterns. Where the following properties are
reserved for the configuration of a gauge monitor
(as defined in the JMX specification):
For example:
*:itf=stat-controller,observedAttribute=RateOfMethodCall,granularityPeriod=5000, lowThreshold=0.05,highThreshold=0.15,differenceMode=false,*represents a pattern that can match the interface "stat-controller" of any component, if this interface specifies an integer or floating-point attribute named "RateOfMethodCall". This attribute will be monitored every 5000 ms.
Threshold high notifications
and
Threshold low notifications
are sent, as defined in the JMX specification for a
gauge monitor
configured with:
LowThreshold=0.05, HighThreshold=0.15 and DifferenceMode=false
(by default NotifyHigh=true and NotifyLow=true).
setMonitorGaugePatterns
in interface AdminAttributes
gauges
- the patterns for filtering
gauge monitor
MBeans.public String getMonitorPeriodicPatterns()
AdminAttributes
periodic monitor
MBeans.
getMonitorPeriodicPatterns
in interface AdminAttributes
periodic monitor
MBeans.AdminAttributes.setMonitorPeriodicPatterns(java.lang.String)
public void setMonitorPeriodicPatterns(String periodic)
AdminAttributes
periodic monitor
MBeans.
Any getter, specified in a component interface whose
ObjectName
matches one of these patterns,
can be observed by a periodic monitor
.
The syntax of this filter is defined to equal a sequence of (";" separated) string representations of
ObjectName
patterns. Where the following properties are
reserved for the configuration of a periodic monitor
:
For example:
*:itf=attribute-controller,observedAttribute=Foo,granularityPeriod=5000represents a pattern that can match the attribute controller interface of any component, if this interface specifies a string attribute "Foo". Every 5000 ms, this attribute will be monitored and a notification will be sent.
setMonitorPeriodicPatterns
in interface AdminAttributes
periodic
- the patterns for filtering periodic monitor
MBeans.public MBeanServer getRawMBeanServer()
AdminAttributes
MBeanServer
used by the agent.
This method allows raw MBean manipulation on the Fractal JMX agent side.
getRawMBeanServer
in interface AdminAttributes
MBeanServer
used by the agent.public void setRawMBeanServer(MBeanServer srv)
AdminAttributes
MBeanServer
used by the agent.
This method is unsupported, but specified since the Fractal
attribute controller
API requires getter and setter methods for each attribute.
setRawMBeanServer
in interface AdminAttributes
srv
- the underlying MBeanServer
used by the agent.public void expose() throws JMException
Admin
monitors
for observing component attributes.
This method:
filter attributes
of the agent.
expose
in interface Admin
JMException
- if a problem occurs during the MBean registration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |