Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.management
Class MBeanConnector

`java.lang.Object
com.tangosol.util.Base
com.tangosol.net.management.MBeanHelper
com.tangosol.net.management.MBeanConnector`

      public class MBeanConnector

extends MBeanHelper

Utility class to expose Coherence JMX MBeans via the Sun JMX reference implementation `HtmlAdaptorServer` or a JMX Remote `JMXConnectorServer`.

In order to use this class, the following system property may need to be set on the monitored cluster nodes (i.e. cache servers):

       -Dtangosol.coherence.management.remote=true

The following properties may be used for configuration of the monitoring node:

`tangosol.coherence.management` | Specifies if a cluster node's JVM has an in-process MBeanServer and if this node allows management of other nodes' managed objects. Use all to specify management of this and all other remotely manageable cluster nodes
`tangosol.coherence.management.remote.host` | The host that the JMX server will bind to. Default is localhost.
`tangosol.coherence.management.remote.registryport` | The port used for the JMX RMI registry. Default is 9000.
`tangosol.coherence.management.remote.connectionport` | The port used for the JMX RMI connection. Default is 3000.
`tangosol.coherence.management.remote.httpport` | The port used for the HTTP connection. Default is 8888.

Since:
  Coherence 3.3
Author:
  pperalta 2007.02.01

Field Summary
`static int` | `DEFAULT_HTTP_PORT` Default HTTP port (8888).
`static int` | `DEFAULT_RMI_CONNECTION_PORT` Default RMI connection port (3000).
`static java.lang.String` | `DEFAULT_RMI_HOST` Default RMI host (localhost).
`static int` | `DEFAULT_RMI_REGISTRY_PORT` Default RMI registry port (9000).
`static java.lang.String` | `HELP_COMMAND_LINE_ARG` Command line argument used to output usage.
`static java.lang.String` | `HTTP_COMMAND_LINE_ARG` Command line argument to start HTTP server.
`static java.lang.String` | `HTTP_PORT_PROPERTY` Property name to specify HTTP port.
`static java.lang.String` | `RMI_COMMAND_LINE_ARG` Command line argument to start RMI server.
`static java.lang.String` | `RMI_CONNECTION_PORT_PROPERTY` Property name to specify RMI connection port.
`static java.lang.String` | `RMI_HOST_PROPERTY` Property name to specify the RMI host.
`static java.lang.String` | `RMI_REGISTRY_PORT_PROPERTY` Property name to specify RMI registry port.
`static java.lang.String[]` | `VALID_COMMANDS` Array that contains all valid command line arguments.

Constructor Summary
`MBeanConnector()`

Method Summary
`static void` | `main(java.lang.String[] asArg)` Start a Coherence cluster node that enables JMX agents such as a web browser or JConsole to connect to the in-process JMX MBeanServer and manage Coherence MBeans.
`static void` | `showUsage()` Output usage instructions.
`void` | `start(boolean fRmi, boolean fHttp)` Start the RMI and/or HTTP agents.
`java.lang.Object` | `startHttpConnector()` Starts the HTTP connector using the values of the `HTTP_*` system properties.
`javax.management.remote.JMXConnectorServer` | `startRmiConnector()` Starts the RMI connector using the values of the `RMI_*` system properties.

Methods inherited from class com.tangosol.net.management.MBeanHelper
`calculateAverage, compareKeyList, ensureSingletonMBean, findMBeanServer, findMBeanServer, getDefaultDomain, getServerFinder, hasDomain, isQuoteRequired, quote, quoteCanonical, registerQueryMBeans, startHttpConnector, startRmiConnector, stripDomain, unquote`

Field Detail

### HELP_COMMAND_LINE_ARG

    public static final java.lang.String HELP_COMMAND_LINE_ARG

  Command line argument used to output usage.
  See Also:
    Constant Field Values

### RMI_COMMAND_LINE_ARG

    public static final java.lang.String RMI_COMMAND_LINE_ARG

  Command line argument to start RMI server.
  See Also:
    Constant Field Values

### HTTP_COMMAND_LINE_ARG

    public static final java.lang.String HTTP_COMMAND_LINE_ARG

  Command line argument to start HTTP server.
  See Also:
    Constant Field Values

### VALID_COMMANDS

    public static final java.lang.String[] VALID_COMMANDS

  Array that contains all valid command line arguments.

### RMI_HOST_PROPERTY

    public static final java.lang.String RMI_HOST_PROPERTY

  Property name to specify the RMI host.
  See Also:
    Constant Field Values

### RMI_CONNECTION_PORT_PROPERTY

    public static final java.lang.String RMI_CONNECTION_PORT_PROPERTY

  Property name to specify RMI connection port.
  See Also:
    Constant Field Values

### RMI_REGISTRY_PORT_PROPERTY

    public static final java.lang.String RMI_REGISTRY_PORT_PROPERTY

  Property name to specify RMI registry port.
  See Also:
    Constant Field Values

### HTTP_PORT_PROPERTY

    public static final java.lang.String HTTP_PORT_PROPERTY

  Property name to specify HTTP port.
  See Also:
    Constant Field Values

### DEFAULT_RMI_HOST

    public static final java.lang.String DEFAULT_RMI_HOST

  Default RMI host (localhost).
  See Also:
    Constant Field Values

### DEFAULT_RMI_CONNECTION_PORT

    public static final int DEFAULT_RMI_CONNECTION_PORT

  Default RMI connection port (3000).
  See Also:
    Constant Field Values

### DEFAULT_RMI_REGISTRY_PORT

    public static final int DEFAULT_RMI_REGISTRY_PORT

  Default RMI registry port (9000).
  See Also:
    Constant Field Values

### DEFAULT_HTTP_PORT

    public static final int DEFAULT_HTTP_PORT

  Default HTTP port (8888).
  See Also:
    Constant Field Values

Constructor Detail

### MBeanConnector

    public MBeanConnector()

Method Detail

### main

    public static void main(java.lang.String[] asArg)
                     throws java.lang.Exception

  Start a Coherence cluster node that enables JMX agents such as a web browser or JConsole to connect to the in-process JMX MBeanServer and manage Coherence MBeans. Command line usage: `java com.tangosol.net.management.MBeanConnector [-rmi] and/or [-http]` Use the following command to connect via JConsole when using the `-rmi` flag: `jconsole service:jmx:rmi://[host]:[RMI Connection port]/jndi/rmi://[host]:[RMI Registry port]/server` To connect via a web browser when using the `-http` flag: `http://[host]:[HTTP port]`
  Throws:
    `java.lang.Exception`

### start

    public void start(boolean fRmi,
                      boolean fHttp)

  Start the RMI and/or HTTP agents.
  Parameters:
    `fRmi` - if true starts the RMI agent
    `fHttp` - if true starts the HTTP agent

### startRmiConnector

    public javax.management.remote.JMXConnectorServer startRmiConnector()
                                                                 throws java.io.IOException

  Starts the RMI connector using the values of the `RMI_*` system properties.
  Returns:
    a JMXConnectorServer that has been started
  Throws:
    `java.io.IOException`
  See Also:
    `MBeanHelper.startRmiConnector(String, int, int, MBeanServer, Map)`, `RMI_HOST_PROPERTY`, `RMI_REGISTRY_PORT_PROPERTY`, `RMI_CONNECTION_PORT_PROPERTY`, `DEFAULT_RMI_HOST`, `DEFAULT_RMI_REGISTRY_PORT`, `DEFAULT_RMI_CONNECTION_PORT`

### startHttpConnector

    public java.lang.Object startHttpConnector()

  Starts the HTTP connector using the values of the `HTTP_*` system properties.
  Returns:
    a `com.sun.jdmk.comm.HtmlAdaptorServer` that has been started
  See Also:
    `MBeanHelper.startHttpConnector(int, MBeanServer)`, `HTTP_PORT_PROPERTY`, `DEFAULT_HTTP_PORT`

### showUsage

    public static void showUsage()

  Output usage instructions.

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.