org.mortbay.http.jmx

Class HttpServerMBean

Implemented Interfaces:
ComponentListener, EventListener, MBeanRegistration, ModelMBean
Known Direct Subclasses:
ServerMBean

public class HttpServerMBean
extends LifeCycleMBean
implements ComponentListener

HttpServer 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.16 $
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

HttpServerMBean()
Constructor.
HttpServerMBean(HttpServer httpServer)
Constructor.

Method Summary

void
addComponent(ComponentEvent event)
protected void
defineManagedResource()
Define the Managed Resource.
ObjectName[]
getComponents()
String
getVersion()
void
postDeregister()
Post Deregister.
void
postRegister(Boolean ok)
void
removeComponent(ComponentEvent event)
void
setManagedResource(Object o, String s)

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

HttpServerMBean

public HttpServerMBean()
            throws MBeanException,
                   InstanceNotFoundException
Constructor.

HttpServerMBean

protected HttpServerMBean(HttpServer httpServer)
            throws MBeanException,
                   InstanceNotFoundException
Constructor.

Method Details

addComponent

public void addComponent(ComponentEvent event)
Specified by:
addComponent in interface ComponentListener

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 LifeCycleMBean

getComponents

public ObjectName[] getComponents()

getVersion

public String getVersion()

postDeregister

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

postRegister

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

removeComponent

public void removeComponent(ComponentEvent event)
Specified by:
removeComponent in interface ComponentListener

setManagedResource

public void setManagedResource(Object o,
                               String s)
            throws MBeanException,
                   InstanceNotFoundException,
                   InvalidTargetObjectTypeException
Overrides:
setManagedResource in interface ModelMBeanImpl

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