Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.instrumentation.jmx
Class JMXProvider

    java.lang.Object
      org.apache.openjpa.lib.instrumentation.AbstractInstrumentationProvider
          org.apache.openjpa.instrumentation.jmx.JMXProvider

All Implemented Interfaces:
  Configurable, InstrumentationProvider

    public class JMXProvider

extends AbstractInstrumentationProvider

A simple MBean JMX instrumentation provider

Field Summary
`static String[]` | `JMX_INSTRUMENT_ALIASES`
`static String` | `MBEAN_DOMAIN` The MBean domain for OpenJPA

Constructor Summary
`JMXProvider()`

Method Summary
`static ObjectName` | `createObjectName(JMXInstrument instrument, Map<String,String> props)` Creates an object name for the supplied instrument and key properties
`String[]` | `getInstrumentAliases()` Returns aliases for built-in instruments.
`Set<MBeanServer>` | `getMBeanServer()` Returns the mbean server
`protected void` | `registerMBean(JMXInstrument mBean)` Register an MBean with the mbean server.
`void` | `start()` Stops the instrumentation provider
`void` | `startInstrument(Instrument instrument)` Start an instrument.
`void` | `stop()` Stops all instruments registered with this provider and releases the reference to the Platform MBean server instance.
`void` | `stopInstrument(Instrument instrument, boolean force)` Stop an instrument.

Methods inherited from class org.apache.openjpa.lib.instrumentation.AbstractInstrumentationProvider
`addInstrument, endConfiguration, getConfiguration, getInstrument, getInstrumentByName, getInstruments, getOptions, initializeInstrument, initializeInstrument, isStarted, removeInstrumentByName, setConfiguration, setInstrument, setOptions, setStarted, startConfiguration, startInstruments, stopInstrument, stopInstruments`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### JMX_INSTRUMENT_ALIASES

    public static final String[] JMX_INSTRUMENT_ALIASES

### MBEAN_DOMAIN

    public static final String MBEAN_DOMAIN

  The MBean domain for OpenJPA

  See Also:
    Constant Field Values

Constructor Detail

### JMXProvider

    public JMXProvider()

Method Detail

### registerMBean

    protected void registerMBean(JMXInstrument mBean)

  Register an MBean with the mbean server.

  Parameters:
    `mBean` -

### getMBeanServer

    public Set<MBeanServer> getMBeanServer()

  Returns the mbean server

  Returns:

### start

    public void start()

  Description copied from interface: `InstrumentationProvider`
  Stops the instrumentation provider

  Specified by:
    `start` in interface `InstrumentationProvider`
  Specified by:
    `start` in class `AbstractInstrumentationProvider`

### stop

    public void stop()

  Stops all instruments registered with this provider and releases the reference to the Platform MBean server instance.

  Specified by:
    `stop` in interface `InstrumentationProvider`
  Specified by:
    `stop` in class `AbstractInstrumentationProvider`

### createObjectName

    public static ObjectName createObjectName(JMXInstrument instrument,
                                              Map<String,String> props)
                                       throws Exception

  Creates an object name for the supplied instrument and key properties

  Parameters:
    `instrument` - the instrument
    `props` - additional key properties
  Returns:
    the JMX object name
  Throws:
    `Exception` - a generic JMX-type exception

### startInstrument

    public void startInstrument(Instrument instrument)

  Start an instrument. Registers an mbean with the server.

  Parameters:
    `instrument` - this instrument to start

### stopInstrument

    public void stopInstrument(Instrument instrument,
                               boolean force)

  Stop an instrument. Unregisters an mbean with the server.

  Parameters:
    `instrument` - the instrument to stop
    `force` - forces the stop if the instrument does not stop gracefully.

### getInstrumentAliases

    public String[] getInstrumentAliases()

  Returns aliases for built-in instruments.

  Specified by:
    `getInstrumentAliases` in interface `InstrumentationProvider`
  Overrides:
    `getInstrumentAliases` in class `AbstractInstrumentationProvider`
  Returns:
    a string array of identifier, class name pairs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.