org.mortbay.jetty.plus.jmx

Class ServerMBean

Implemented Interfaces:
ComponentListener, EventListener, MBeanRegistration, ModelMBean

public class ServerMBean
extends ServerMBean

JettyPlus Server MBean. This Model MBean class provides the mapping for HttpServer management methods. It also registers itself as a membership listener of the HttpServer, so it can create and destroy MBean wrappers for listeners and contexts.
Version:
$Revision: 1.6 $
Author:
Greg Wilkins (gregw)

Field Summary

Fields inherited from class org.mortbay.util.jmx.ModelMBeanImpl

IMPACT_ACTION, IMPACT_ACTION_INFO, IMPACT_INFO, IMPACT_UNKOWN, INT, NO_PARAMS, OBJECT, ON_MBEAN, ON_OBJECT, READ_ONLY, READ_WRITE, STRING, _beanInfo

Constructor Summary

ServerMBean()
Constructor.
ServerMBean(String configuration)
Constructor.
ServerMBean(Server jettyServer)
Constructor.

Method Summary

protected void
defineManagedResource()
Define the Managed Resource.
protected ObjectName
newObjectName(MBeanServer server)
Create a new ObjectName.
void
postDeregister()
Post Deregister.
void
postRegister(Boolean ok)

Methods inherited from class org.mortbay.jetty.jmx.ServerMBean

defineManagedResource, newObjectName, postDeregister, postRegister

Methods inherited from class org.mortbay.http.jmx.HttpServerMBean

addComponent, defineManagedResource, getComponents, getVersion, postDeregister, postRegister, removeComponent, setManagedResource

Methods inherited from class org.mortbay.util.jmx.LifeCycleMBean

defineManagedResource

Methods inherited from class org.mortbay.util.jmx.ModelMBeanImpl

addAttributeChangeNotificationListener, addNotificationListener, defineAttribute, defineAttribute, defineAttribute, defineAttribute, defineManagedResource, defineOperation, defineOperation, defineOperation, defineOperation, destroyComponentMBeans, getAttribute, getAttributes, getBaseObjectName, getComponentMBeans, getDefaultDomain, getMBeanInfo, getMBeanServer, getManagedResource, getNotificationInfo, getObjectName, invoke, load, mbeanFor, newObjectName, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setBaseObjectName, setDefaultDomain, setManagedResource, setModelMBeanInfo, store, uniqueObjectName, uniqueObjectName

Constructor Details

ServerMBean

public ServerMBean()
            throws MBeanException,
                   InstanceNotFoundException
Constructor.

ServerMBean

public ServerMBean(String configuration)
            throws IOException,
                   MBeanException,
                   InstanceNotFoundException
Constructor.
Parameters:
configuration - URL or File to jetty.xml style configuration file

ServerMBean

protected ServerMBean(Server jettyServer)
            throws MBeanException,
                   InstanceNotFoundException
Constructor.

Method Details

defineManagedResource

protected void defineManagedResource()
Define the Managed Resource. This method is called the first time setManagedResource is called with a non-null object. It should be implemented by a derived ModelMBean to define the attributes and operations after an initial object has been set.
Overrides:
defineManagedResource in interface ServerMBean

newObjectName

protected ObjectName newObjectName(MBeanServer server)
Create a new ObjectName. Return a new object name. The default implementation is the results of uniqueObjectName(baseObjectName), if baseObjectName is not set, then the results of uniqueObjectName(defaultDomain+":");
Overrides:
newObjectName in interface ServerMBean
Returns:
The Object name

postDeregister

public void postDeregister()
Post Deregister. This implementation destroys this MBean and it cannot be used again.
Overrides:
postDeregister in interface ServerMBean

postRegister

public void postRegister(Boolean ok)
Overrides:
postRegister in interface ServerMBean
Parameters:
ok -

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.