|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.controller.jmx.JmxAgent
Generic JMX Server with loading of different adaptors and enalbing of security options.
Field Summary | |
protected static java.util.ArrayList |
adaptors
|
protected static java.lang.String |
domainName
|
private static boolean |
enableSSL
|
private java.lang.String |
hostname
|
(package private) static Trace |
logger
Logger instance |
protected static javax.management.MBeanServer |
server
|
private static javax.management.ObjectName |
ssl
|
Constructor Summary | |
protected |
JmxAgent()
Creates a new JMX agent bound to the localhost |
protected |
JmxAgent(java.lang.String hostname)
Creates a new JMX agent |
Method Summary | |
private static void |
addAdaptor(JmxAdaptor adaptor)
Add an adaptor to this agent |
void |
addInterceptor(mx4j.server.interceptor.DefaultMBeanServerInterceptor custom)
Add an interceptor to the server |
void |
enableAdaptor(java.lang.String type,
int port)
Enable an adaptor for this JmxAgent add it to the internal store of adaptors. |
private static void |
enableSSL()
This is to enable SSL over RMI |
protected static void |
register(java.lang.Object mbean,
java.lang.String name,
java.lang.String type)
Register a mean in the JmxAgent |
void |
registerMBean(java.lang.Object mbean)
Generically Register a mean in the JmxAgent |
void |
setDomainName(java.lang.String domain)
Set domain name fot this jmx agent |
void |
setSsl(boolean ssl)
Possibly enable SSL support |
void |
start()
This method start the JMX server, the http adaptor and register the MBeans. |
void |
stop()
Stop all the adaptor for this jmx agent, and stop the agent; |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static javax.management.ObjectName ssl
protected static java.lang.String domainName
private java.lang.String hostname
private static boolean enableSSL
protected static javax.management.MBeanServer server
protected static java.util.ArrayList adaptors
static Trace logger
Constructor Detail |
protected JmxAgent() throws java.lang.Exception
java.lang.Exception
- If host name cannot be resolvedprotected JmxAgent(java.lang.String hostname) throws java.lang.Exception
java.lang.Exception
- If host name cannot be resolvedMethod Detail |
public void setSsl(boolean ssl) throws JmxException
ssl
- if true, tries to enable rmi on ssl
JmxException
- if ssl=true
and public void addInterceptor(mx4j.server.interceptor.DefaultMBeanServerInterceptor custom) throws JmxException
custom
- an object that can be identified as an MBeanServerInterceptor
JmxException
- if failspublic void setDomainName(java.lang.String domain)
domain
- the name of the domainprivate static final void addAdaptor(JmxAdaptor adaptor)
adaptor
- a jmxadaptorpublic void enableAdaptor(java.lang.String type, int port) throws JmxException
type
- the type of the adaptorport
- the port to use for this adaptor
JmxException
- if failspublic void start() throws JmxException
JmxException
- if service fails to startpublic void stop() throws JmxException
JmxException
- if failsprivate static final void enableSSL() throws JmxException
java.lang.Exception
- if creation fails
JmxException
public void registerMBean(java.lang.Object mbean) throws JmxException
mbean
- the mbean
JmxException
- if failsprotected static void register(java.lang.Object mbean, java.lang.String name, java.lang.String type) throws JmxException
mbean
- the mbeanname
- the name of the mbeantype
- the type of the mean
java.lang.Exception
- if fails
JmxException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |