|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.util.JEApplicationMBean
public class JEApplicationMBean
JEApplicationMBean is an example of how a JE application can incorporate JE monitoring into its existing MBean. It may be installed as is, or used as a starting point for building a MBean which includes JE support.
JE management is divided between the JEApplicationMBean class and JEMBeanHelper class. JEApplicationMBean contains an instance of JEMBeanHelper, which knows about JE attributes, operations and notifications. JEApplicationMBean itself has the responsibility of configuring, opening and closing the JE environment along with any other resources used by the application, and maintains a com.sleepycat.je.Environment handle.
The approach taken for accessing the environment is an application specific choice. Some of the salient considerations are:
Another MBean approach for environment access can be seen in com.sleepycat.je.jmx.JEMonitor. That MBean does not take responsibility for opening and closing environments, and can only operate against already-open environments.
This bean was copied from bdb je 2.0 source and modified so could pass in and monitor an environment created externally. Also added toString versions of the locks and stats calls since the objects don't seem to make it over the RMI divide (Not serializable. St.Ack
Field Summary | |
---|---|
static java.lang.String |
OP_CLOSE
This MBean provides a close operation to release the JE environment. |
static java.lang.String |
OP_OPEN
This MBean provides an open operation to open the JE environment. |
Constructor Summary | |
---|---|
JEApplicationMBean(com.sleepycat.je.Environment env)
Instantiate a JEApplicationMBean |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String attributeName)
|
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
|
javax.management.MBeanInfo |
getMBeanInfo()
|
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
|
void |
setAttribute(javax.management.Attribute attribute)
|
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OP_OPEN
public static final java.lang.String OP_CLOSE
Constructor Detail |
---|
public JEApplicationMBean(com.sleepycat.je.Environment env) throws com.sleepycat.je.DatabaseException
env
- Environment to use. Externally managed.
com.sleepycat.je.DatabaseException
Method Detail |
---|
public java.lang.Object getAttribute(java.lang.String attributeName) throws javax.management.AttributeNotFoundException, javax.management.MBeanException
getAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.MBeanException
DynamicMBean.getAttribute(java.lang.String)
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException
setAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
DynamicMBean.setAttribute(javax.management.Attribute)
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes
in interface javax.management.DynamicMBean
DynamicMBean.getAttributes(java.lang.String[])
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
DynamicMBean.setAttributes(javax.management.AttributeList)
public java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException
invoke
in interface javax.management.DynamicMBean
javax.management.MBeanException
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
DynamicMBean.getMBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |