view src/share/classes/javax/management/remote/package.html @ 0:37a05a11f281

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
children 00cd9dc3c2b5
line wrap: on
line source
    <title>JMX<sup><font size="-2">TM</font></sup> Remote API.</title>
Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.  Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the LICENSE file that accompanied this code.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).

You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
CA 95054 USA or visit if you need additional information or
have any questions.
<body bgcolor="white">
      <p>Interfaces for remote access to
	JMX MBean servers.
	This package defines the essential interfaces for making a JMX
	MBean server manageable remotely. The specification of this 
        functionality is completed by Part III of the 
       <a href="{@docRoot}/../technotes/guides/jmx/JMX_1_4_specification.pdf">
	JMX Specification, version 1.4</a> PDF document.</p>

      <p>The JMX specification defines the notion of <b>connectors</b>.
	A connector is attached to a JMX API MBean server and makes it
	accessible to remote Java clients. The client end of a
	connector exports essentially the same interface as the MBean
	server, specifically the {@link MBeanServerConnection}

      <p>A connector makes an MBean server remotely accessible through
	a given protocol. The JMX Remote API allows the use of different 
        type of connectors:

       <li>The JMX Remote API defines a standard connector,
	the <b>RMI Connector</b>, which provides remote access to an
        MBeanServer through RMI.

       <li>The JMX Remote API also defines an optional connector called 
        <b>JMXMP Connector</b> implementing the JMX Message Protocol 
	(JMXMP). As it is optional, it is not part of this bundle (see
	note below).

       <li>User-defined connector protocols are also possible using the 
	JMXConnectorFactory} and, optionally, the Generic Connector
	(not part of this bundle, see note below).</p>

      <p><u>Note</u>: the optional packages implementing
        the optional part of the <em>JMX Remote API</em>
        are not included in the <em>Java SE Platform</em> 
        but are available from the <em>JMX Remote API 
	<a href="">
	Reference Implementation</a></em>.</p>

      <h3>Connector addresses</h3>

      <p>Typically, a connector server has an address, represented by the
	class {@link
	JMXServiceURL}.  An address for the RMI Connector can look
	like this:</p>


      <p>In this <code>JMXServiceURL</code>, the first <code>rmi:</code>
        specifies the RMI connector, while the second <code>rmi:</code> 
        specifies the RMI registry into which the RMI connector server 
        has stored its stub.

      <p>The example above shows only one form of address.
        An address for the RMI Connector can take several forms,
	as detailed in the documentation for the package

      <h3>Creating a connector server</h3>

      <p>A connector server is created by constructing an instance of
	a subclass of {@link
	JMXConnectorServer}.  Usually, this instance is created
        using the method {@link,

      <p>Typically, a connector server is associated with an MBean
	server either by registering it in that MBean server, or by
	supplying the MBean server as a parameter when creating the
	connector server.</p>

      <h3>Creating a connector client</h3>

      <p>A connector client is usually created by supplying the
	<code>JMXServiceURL</code> of the connector server to connect to 
        to the {@link
	JMXConnectorFactory.connect} method.</p>

      <p>For more specialized uses, a connector client can be created
	by directly instantiating a class that implements the {@link JMXConnector} interface,
	for example the class {@link

      <h3>Additional client or server parameters</h3>

      <p>When creating a connector client or server, it is possible to
	supply an object of type {@link java.util.Map Map} that defines
	additional parameters.  Each entry in this Map has a key that is
	a string and an associated value whose type is appropriate for
	that key.  The standard keys defined by the JMX Remote API all
	begin with the string "<code>jmx.remote.</code>".  The document
	<em>JMX Remote API</em> lists these standard keys.</p>

      <h3>Connection identifiers</h3>

      <p>Every connection opened by a connector server has a string
	identifier, called its <b>connection id</b>.  This identifier
	appears in the {@link
	JMXConnectionNotification} events emitted by the connector
	server, in the list returned by {@link
	getConnectionIds()}, and in the value
	returned by the client's {@link
	getConnectionId()} method.</p>

      <p>As an example, a connection ID can look something like this:</p>

rmi:// username 1

      <p>The formal grammar for connection ids that follow this
	convention is as follows (using the <a
	notation</a> from <em>The Java Language Specification, Second

    <em>Protocol</em> : <em>ClientAddress<sub>opt</sub></em> Space <em>ClientId<sub>opt</sub></em> Space <em>ArbitraryText</em>

    // <em>HostAddress</em> <em>ClientPort<sub>opt</sub></em>

    : <em>HostPort</em>

      <p>The <code><em>Protocol</em></code> is a protocol that would
	be recognized by {@link

      <p>The <code><em>ClientAddress</em></code> is the
	address and port of the connecting client, if these can be
	determined, otherwise nothing.  The
	<code><em>HostAddress</em></code> is the Internet address of
	the host that the client is connecting from, in numeric or DNS
	form.  Numeric IPv6 addresses are enclosed in square brackets
	<code>[]</code>.  The <code><em>HostPort</em></code> is the
	decimal port number that the client is connecting from.</p>

      <p>The <code><em>ClientId</em></code> is the identity of the
	client entity, typically a string returned by {@link
	JMXPrincipal.getName()}.  This string must not contain

      <p>The <code><em>ArbitraryText</em></code> is any additional
	text that the connector server adds when creating the client id.
	At a minimum, it must be enough to distinguish this connection
	ID from the ID of any other connection currently opened by this
	connector server.</p>

    @see <a href="{@docRoot}/../technotes/guides/jmx/">
      Java SE 6 Platform documentation on JMX technology</a>,
    in particular the 
    <a href="{@docRoot}/../technotes/guides/jmx/JMX_1_4_specification.pdf">
      JMX Specification, version 1.4</a>
    @since 1.5