org.eclipse.jetty.jmx

## Class MBeanContainer

- java.lang.Object
- - org.eclipse.jetty.util.component.AbstractLifeCycle
  - - org.eclipse.jetty.jmx.MBeanContainer

- All Implemented Interfaces:
    EventListener, Container.Listener, Dumpable, LifeCycle

      public class MBeanContainer
      extends AbstractLifeCycle
      implements Container.Listener, Dumpable

  Container class for the MBean instances

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `AbstractLifeCycle.AbstractLifeCycleListener`

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `LifeCycle.Listener`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBeanContainer(MBeanServer server)` Constructs MBeanContainer

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Container.Relationship relationship)` Implementation of Container.Listener interface
    `void` | `addBean(Object obj)` Implementation of Container.Listener interface
    `void` | `doStart()` Perform actions needed to start lifecycle
    `void` | `doStop()` Perform actions needed to stop lifecycle
    `String` | `dump()`
    `void` | `dump(Appendable out, String indent)`
    `Object` | `findBean(ObjectName oname)` Lookup an instance by object name
    `ObjectName` | `findMBean(Object object)` Lookup an object name by instance
    `String` | `getDomain()` Retrieve domain name used to add MBeans
    `MBeanServer` | `getMBeanServer()` Retrieve instance of MBeanServer used by container
    `String` | `makeName(String basis)`
    `void` | `remove(Container.Relationship relationship)` Implementation of Container.Listener interface
    `void` | `removeBean(Object obj)` Implementation of Container.Listener interface
    `void` | `setDomain(String domain)` Set domain to be used to add MBeans

    - ### Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MBeanContainer

          public MBeanContainer(MBeanServer server)

      Constructs MBeanContainer
      Parameters:
        `server` - instance of MBeanServer for use by container

  - ### Method Detail

    - #### findMBean

          public ObjectName findMBean(Object object)

      Lookup an object name by instance
      Parameters:
        `object` - instance for which object name is looked up
      Returns:
        object name associated with specified instance, or null if not found

    - #### findBean

          public Object findBean(ObjectName oname)

      Lookup an instance by object name
      Parameters:
        `oname` - object name of instance
      Returns:
        instance associated with specified object name, or null if not found

    - #### getMBeanServer

          public MBeanServer getMBeanServer()

      Retrieve instance of MBeanServer used by container
      Returns:
        instance of MBeanServer

    - #### setDomain

          public void setDomain(String domain)

      Set domain to be used to add MBeans
      Parameters:
        `domain` - domain name

    - #### getDomain

          public String getDomain()

      Retrieve domain name used to add MBeans
      Returns:
        domain name

    - #### add

          public void add(Container.Relationship relationship)

      Implementation of Container.Listener interface
      Specified by:
        `add` in interface `Container.Listener`
      See Also:
        `Container.Listener.add(org.eclipse.jetty.util.component.Container.Relationship)`

    - #### remove

          public void remove(Container.Relationship relationship)

      Implementation of Container.Listener interface
      Specified by:
        `remove` in interface `Container.Listener`
      See Also:
        `Container.Listener.remove(org.eclipse.jetty.util.component.Container.Relationship)`

    - #### removeBean

          public void removeBean(Object obj)

      Implementation of Container.Listener interface
      Specified by:
        `removeBean` in interface `Container.Listener`
      See Also:
        `Container.Listener.removeBean(java.lang.Object)`

    - #### addBean

          public void addBean(Object obj)

      Implementation of Container.Listener interface
      Specified by:
        `addBean` in interface `Container.Listener`
      See Also:
        `Container.Listener.addBean(java.lang.Object)`

    - #### makeName

          public String makeName(String basis)

      Parameters:
        `basis` - name to strip of special characters.
      Returns:
        normalized name

    - #### doStart

          public void doStart()

      Perform actions needed to start lifecycle
      Overrides:
        `doStart` in class `AbstractLifeCycle`
      See Also:
        `AbstractLifeCycle.doStart()`

    - #### doStop

          public void doStop()

      Perform actions needed to stop lifecycle
      Overrides:
        `doStop` in class `AbstractLifeCycle`
      See Also:
        `AbstractLifeCycle.doStop()`

    - #### dump

          public void dump(Appendable out,
                  String indent)
                    throws IOException

      Specified by:
        `dump` in interface `Dumpable`
      Throws:
        `IOException`

    - #### dump

          public String dump()

      Specified by:
        `dump` in interface `Dumpable`

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.