org.openqa.jetty.jetty.jmx
Class ServerMBean

java.lang.Object
  extended by org.openqa.jetty.util.jmx.ModelMBeanImpl
      extended by org.openqa.jetty.util.jmx.LifeCycleMBean
          extended by org.openqa.jetty.http.jmx.HttpServerMBean
              extended by org.openqa.jetty.jetty.jmx.ServerMBean
All Implemented Interfaces:
java.util.EventListener, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.modelmbean.ModelMBean, javax.management.modelmbean.ModelMBeanNotificationBroadcaster, javax.management.NotificationBroadcaster, javax.management.PersistentMBean, ComponentListener

public class ServerMBean
extends HttpServerMBean

JettyServer 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.12 $
Author:
Greg Wilkins (gregw)

Field Summary
 
Fields inherited from class org.openqa.jetty.util.jmx.ModelMBeanImpl
_beanInfo, IMPACT_ACTION, IMPACT_ACTION_INFO, IMPACT_INFO, IMPACT_UNKOWN, INT, NO_PARAMS, OBJECT, ON_MBEAN, ON_OBJECT, READ_ONLY, READ_WRITE, STRING
 
Constructor Summary
ServerMBean()
          Constructor.
ServerMBean(Server jettyServer)
          Constructor.
ServerMBean(java.lang.String configuration)
          Constructor.
 
Method Summary
protected  void defineManagedResource()
          Define the Managed Resource.
protected  javax.management.ObjectName newObjectName(javax.management.MBeanServer server)
          Create a new ObjectName.
 void postDeregister()
          Post Deregister.
 void postRegister(java.lang.Boolean ok)
           
 
Methods inherited from class org.openqa.jetty.http.jmx.HttpServerMBean
addComponent, getComponents, getVersion, removeComponent, setManagedResource
 
Methods inherited from class org.openqa.jetty.util.jmx.ModelMBeanImpl
addAttributeChangeNotificationListener, addNotificationListener, defineAttribute, defineAttribute, defineAttribute, defineAttribute, defineOperation, defineOperation, defineOperation, defineOperation, destroyComponentMBeans, getAttribute, getAttributes, getBaseObjectName, getComponentMBeans, getDefaultDomain, getManagedResource, getMBeanInfo, getMBeanServer, getNotificationInfo, getObjectName, invoke, load, mbeanFor, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setBaseObjectName, setDefaultDomain, setModelMBeanInfo, store, uniqueObjectName, uniqueObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerMBean

public ServerMBean(Server jettyServer)
            throws javax.management.MBeanException,
                   javax.management.InstanceNotFoundException
Constructor.

Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException

ServerMBean

public ServerMBean()
            throws javax.management.MBeanException,
                   javax.management.InstanceNotFoundException
Constructor.

Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException

ServerMBean

public ServerMBean(java.lang.String configuration)
            throws java.io.IOException,
                   javax.management.MBeanException,
                   javax.management.InstanceNotFoundException
Constructor.

Parameters:
configuration - URL or File to jetty.xml style configuration file
Throws:
java.io.IOException
javax.management.MBeanException
javax.management.InstanceNotFoundException
Method Detail

newObjectName

protected javax.management.ObjectName newObjectName(javax.management.MBeanServer server)
Description copied from class: ModelMBeanImpl
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 class ModelMBeanImpl
Returns:
The Object name

defineManagedResource

protected void defineManagedResource()
Description copied from class: ModelMBeanImpl
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 class HttpServerMBean

postRegister

public void postRegister(java.lang.Boolean ok)
Specified by:
postRegister in interface javax.management.MBeanRegistration
Overrides:
postRegister in class HttpServerMBean
Parameters:
ok -

postDeregister

public void postDeregister()
Description copied from class: ModelMBeanImpl
Post Deregister. This implementation destroys this MBean and it cannot be used again.

Specified by:
postDeregister in interface javax.management.MBeanRegistration
Overrides:
postDeregister in class HttpServerMBean


Copyright © 2011. All Rights Reserved.