|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.management.MBeanHelper
public abstract class MBeanHelper
Helper class providing various functionality related to aggregation of attributes and methods exposed by Coherence JMX framework MBeans.
Field Summary | |
---|---|
static java.lang.String |
NETWORK_HEALTH The Network Health MBean name. |
Constructor Summary | |
---|---|
MBeanHelper() |
Method Summary | |
---|---|
static double |
calculateAverage(javax.management.MBeanServer server, java.lang.String sPattern, java.lang.String sAttribute) Calculate the average of the attribute values across all the MBeans with a given name pattern. |
static MBeanReference |
ensureNetworkHealthMBean() Ensure that there is an instance of NetworkHealth MBean registered with the default MBeansServer. |
static MBeanReference |
ensureSingletonMBean(java.lang.String sName) Ensure that there is an instance of a local MBean of the specified type registered with the default MBeansServer. |
static javax.management.MBeanServer |
findMBeanServer() Find an MBeanServer that Coherence MBeans are registered with. |
static javax.management.MBeanServer |
findMBeanServer(java.lang.String sDefaultDomain) Find an MBeanServer that has the specified default domain name. |
static java.lang.String |
getDefaultDomain() Return the the default domain name as configured in the Coherence operational configuration descriptor. |
static boolean |
isQuoteRequired(java.lang.String s) Determine if the string requires quotes. |
static java.lang.String |
quote(java.lang.String s) Create an escape-sequence string that allows for special characters to be included in a JMX ObjectName. |
static java.lang.String |
quoteCanonical(java.lang.String sCanonical) Return a quoted KeyPropertyString or a quoted canonical name. |
static void |
registerQueryMBeans(java.lang.String sMBeanServerDomain, java.lang.String sQuery, java.lang.String sPrefix, Registry registry) Find all MBeans matching to the specified query at a local MBeanServer and register them with the specified Registry. |
static java.lang.Object |
startHttpConnector(int nPort, javax.management.MBeanServer mbs) Start a com.sun.jdmk.comm.HtmlAdaptorServer, which is a part of the Sun JMX reference implementation. |
static javax.management.remote.JMXConnectorServer |
startRmiConnector(java.lang.String sHost, int nRegPort, int nConPort, javax.management.MBeanServer mbs, java.util.Map mapEnv) Start a JMXConnectorServer . |
static java.lang.String |
unquote(java.lang.String s) Convert a string returned from the quote(java.lang.String) method to the original string. |
Field Detail |
---|
public static final java.lang.String NETWORK_HEALTH
Constructor Detail |
---|
public MBeanHelper()
Method Detail |
---|
public static java.lang.String getDefaultDomain()
public static javax.management.MBeanServer findMBeanServer()
public static javax.management.MBeanServer findMBeanServer(java.lang.String sDefaultDomain)
sDefaultDomain
- the domain namepublic static void registerQueryMBeans(java.lang.String sMBeanServerDomain, java.lang.String sQuery, java.lang.String sPrefix, Registry registry)
sMBeanServerDomain
- the default domain of the MBeanServer where the query should be executed. If this value is empty or null the Coherence default domain is usedsQuery
- a JMX query string that will be used to find the MBeanssPrefix
- a target location to prepend to converted MBean namesregistry
- a Registry to register the JMX query results withpublic static double calculateAverage(javax.management.MBeanServer server, java.lang.String sPattern, java.lang.String sAttribute)
server
- the MBeanServersPattern
- the name patternsAttribute
- the attribute namepublic static MBeanReference ensureNetworkHealthMBean()
public static MBeanReference ensureSingletonMBean(java.lang.String sName)
sName
- an MBean namepublic static javax.management.remote.JMXConnectorServer startRmiConnector(java.lang.String sHost, int nRegPort, int nConPort, javax.management.MBeanServer mbs, java.util.Map mapEnv)
JMXConnectorServer
. This method is used to expose the specified MBeanServer to external agents (such as JConsole) using RMI.sHost
- host to bind tonRegPort
- port used for the JMX RMI registrynConPort
- port used for the JMX RMI connectionmbs
- MBeanServer
that contains Coherence MBeansmapEnv
- a set of attributes to control the new connector server's behaviorJMXConnectorServerFactory
public static java.lang.Object startHttpConnector(int nPort, javax.management.MBeanServer mbs)
nPort
- port to bind the HTTP server tombs
- MBeanServer that this HTTP server will exposepublic static java.lang.String quote(java.lang.String s)
s
- the string to be quotedpublic static java.lang.String unquote(java.lang.String s)
quote(java.lang.String)
method to the original string.s
- the string to be unquotedjava.lang.IllegalArgumentException
- if the passed string could not have been returned by the quote(java.lang.String)
method; for instance if it does not begin and end with a quote (")public static boolean isQuoteRequired(java.lang.String s)
s
- the string to be quotedquote(java.lang.String)
method needs to be calledpublic static java.lang.String quoteCanonical(java.lang.String sCanonical) throws javax.management.MalformedObjectNameException
KeyPropertyString
or a quoted canonical name.sCanonical
- a string to be quotedjavax.management.MalformedObjectNameException
- if the name is invalid
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |