Class JMXContext
- java.lang.Object
-
- com.levigo.jadice.server.core.jmx.JMXContext
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class JMXContext extends Object implements org.springframework.beans.factory.InitializingBean
-
-
Constructor Summary
Constructors Constructor Description JMXContext(org.springframework.jmx.export.assembler.MBeanInfoAssembler infoAssembler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
attachToCurrentThread()
ObjectName
createBeanName(String type, String extraKeys)
Create an ObjectName for a Bean below the base name.static JMXContext
get()
org.springframework.jmx.export.assembler.MBeanInfoAssembler
getInfoAssembler()
MBeanServer
getMBeanServer()
String
getName()
void
register(SelfRegistering instance)
void
register(ObjectName objectName, Object bean)
void
setInfoAssembler(org.springframework.jmx.export.assembler.MBeanInfoAssembler infoAssembler)
void
setMBeanServer(MBeanServer beanServer)
void
setName(String name)
void
unregister(SelfRegistering instance)
void
unregister(ObjectName objectName)
-
-
-
Method Detail
-
get
public static JMXContext get()
-
getName
public String getName()
-
setName
public void setName(String name)
-
attachToCurrentThread
public void attachToCurrentThread()
-
register
public void register(ObjectName objectName, Object bean)
-
unregister
public void unregister(ObjectName objectName)
-
getMBeanServer
public MBeanServer getMBeanServer()
-
getInfoAssembler
public org.springframework.jmx.export.assembler.MBeanInfoAssembler getInfoAssembler()
- Returns:
- the infoAssembler
-
setInfoAssembler
public void setInfoAssembler(org.springframework.jmx.export.assembler.MBeanInfoAssembler infoAssembler)
- Parameters:
infoAssembler
- the infoAssembler to set
-
setMBeanServer
public void setMBeanServer(MBeanServer beanServer)
- Parameters:
beanServer
- the mBeanServer to set
-
register
public void register(SelfRegistering instance)
-
unregister
public void unregister(SelfRegistering instance)
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
createBeanName
public ObjectName createBeanName(String type, String extraKeys) throws MalformedObjectNameException
Create an ObjectName for a Bean below the base name. The name will have the following form:com.levigo.jadice.server:Name={base name},Type={type}[,extra keys]
- Parameters:
type
- Type of the beanextraKeys
- additional information (optional)- Returns:
- object name for a Bean
- Throws:
MalformedObjectNameException
- if the type parameter contains illegal characters
-
-