|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMBeanHelperService
Little helper service to provide simple access to commonly used functionality
when handling MBeans. Allows the underlying implementation to cache commonly
used values, and allows the user to control when the cache is cleared.
Also provides AttributeValue
.
This service is really for JRMC internal use. Do not expect this one to be
around for ever, nor that it will remain unchanged.
Field Summary | |
---|---|
static long |
NO_TIMESTAMP_AVAILABLE
Time-stamp value for when no time-stamp is available. |
Method Summary | |
---|---|
void |
addMBeanServerChangeListener(IMBeanServerChangeListener listener)
Adds a listener which will be executed when the MBean configuration in the MBean server changes. |
void |
clearCache()
Clears any caches used by the underlying implementation. |
long |
getApproximateServerTime(long currentTimeMillis)
Takes a local time and tries to transform it to what it would have been in server time given the last measurements. |
AttributeValue |
getAttribute(AttributeDescriptor attrDescriptor)
Retrieves the value of an attribute. |
java.util.List |
getAttributes(java.util.List attributesToFetch)
Will return the specified attributes. |
long |
getLocalStartTime()
Returns the start time in milliseconds when the connectorModel was connected. |
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName mbean)
Returns the MBeanInfo for the specified MBean. |
java.util.Map |
getMBeanInfos()
Returns the bean infos for all available MBeans. |
java.util.Set |
getMBeanNames()
Return a set of ObjectName containing all the names of all
available MBeans. |
long |
getRemoteStartTime()
Returns the time that the monitored JRockit was started, in server time. |
void |
removeMBeanServerChangeListener(IMBeanServerChangeListener listener)
Removes any listener that was added by addMBeanServerChangeListener(IMBeanServerChangeListener) . |
void |
setAttribute(AttributeDescriptor attributeDescriptor,
java.lang.Object data)
Sets the specified attribute. |
Field Detail |
---|
static final long NO_TIMESTAMP_AVAILABLE
Method Detail |
---|
java.util.Set getMBeanNames() throws java.io.IOException
ObjectName
containing all the names of all
available MBeans.
ObjectName
containing all the names of all
available MBeans.
java.io.IOException
- if a problem occurred with underlying connection.void clearCache()
AttributeValue getAttribute(AttributeDescriptor attrDescriptor) throws java.io.IOException, javax.management.JMException
attrDescriptor
- the self containing description of the attribute to retrieved
(ObjectName + attribute).
java.io.IOException
- if a problem occurred with underlying connection.
javax.management.JMException
- if a JMX problem occurred.java.util.Map getMBeanInfos() throws java.io.IOException
java.io.IOException
- if the connection failed or some other IO related problem
occurred.javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName mbean) throws java.io.IOException
mbean
- the MBean for which to return the information.
null
).
java.io.IOException
- if the connection failed or some other IO related problem
occurred.long getApproximateServerTime(long currentTimeMillis)
currentTimeMillis
- the time for which to derive the approximate server time.
long getLocalStartTime()
NO_TIMESTAMP_AVAILABLE
is returned.java.util.List getAttributes(java.util.List attributesToFetch) throws java.io.IOException, javax.management.InstanceNotFoundException, javax.management.ReflectionException
attributesToFetch
- the attributes to fetch as a list of IAttributeInfo
.
java.io.IOException
- if communication failed.
javax.management.ReflectionException
- if one of the attributes could not be found.
javax.management.InstanceNotFoundException
- if one of the mbeans could not be found.void setAttribute(AttributeDescriptor attributeDescriptor, java.lang.Object data) throws javax.management.OperationsException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, java.io.IOException, javax.management.ReflectionException
attributeDescriptor
- the attribute to set.data
- the data to set.
javax.management.OperationsException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
java.io.IOException
javax.management.ReflectionException
long getRemoteStartTime()
void addMBeanServerChangeListener(IMBeanServerChangeListener listener)
listener
- the listener add. Should complete quickly.void removeMBeanServerChangeListener(IMBeanServerChangeListener listener)
addMBeanServerChangeListener(IMBeanServerChangeListener)
. If no
listener has been added nothing happens.
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |