< prev index next >

src/java.management/share/classes/javax/management/remote/package.html

Print this page


   1 <html>
   2 <head>
   3     <title>JMX&trade; Remote API.</title>
   4 <!--
   5 Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
   6 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7 
   8 This code is free software; you can redistribute it and/or modify it
   9 under the terms of the GNU General Public License version 2 only, as
  10 published by the Free Software Foundation.  Oracle designates this
  11 particular file as subject to the "Classpath" exception as provided
  12 by Oracle in the LICENSE file that accompanied this code.
  13 
  14 This code is distributed in the hope that it will be useful, but WITHOUT
  15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17 version 2 for more details (a copy is included in the LICENSE file that
  18 accompanied this code).
  19 
  20 You should have received a copy of the GNU General Public License version
  21 2 along with this work; if not, write to the Free Software Foundation,
  22 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  23 
  24 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  25 or visit www.oracle.com if you need additional information or have any


  54 
  55        <li>The JMX Remote API also defines an optional connector called 
  56         <b>JMXMP Connector</b> implementing the JMX Message Protocol 
  57         (JMXMP). As it is optional, it is not part of this bundle (see
  58         note below).
  59 
  60        <li>User-defined connector protocols are also possible using the 
  61         {@link javax.management.remote.JMXConnectorFactory
  62         JMXConnectorFactory} and, optionally, the Generic Connector
  63         (not part of this bundle, see note below).
  64       </ul>
  65 
  66       <p><u>Note</u>: the optional packages implementing
  67         the optional part of the <em>JMX Remote API</em>
  68         are not included in the <em>Java SE Platform</em> 
  69         but are available from the <em>JMX Remote API 
  70         <a href="http://java.sun.com/products/JavaManagement/download.html">
  71         Reference Implementation</a></em>.</p>
  72 
  73 
  74       <h2>Connector addresses</h2>
  75 
  76       <p>Typically, a connector server has an address, represented by the
  77         class {@link javax.management.remote.JMXServiceURL
  78         JMXServiceURL}.  An address for the RMI Connector can look
  79         like this:</p>
  80 
  81       <pre>
  82       service:jmx:rmi:///jndi/rmi://myhost:1099/myname
  83       </pre>
  84 
  85       <p>In this <code>JMXServiceURL</code>, the first <code>rmi:</code>
  86         specifies the RMI connector, while the second <code>rmi:</code> 
  87         specifies the RMI registry into which the RMI connector server 
  88         has stored its stub.
  89 
  90       <p>The example above shows only one form of address.
  91         An address for the RMI Connector can take several forms,
  92         as detailed in the documentation for the package
  93         <code>{@link javax.management.remote.rmi}</code>.</p>
  94 
  95       <h2>Creating a connector server</h2>
  96 
  97       <p>A connector server is created by constructing an instance of
  98         a subclass of {@link
  99         javax.management.remote.JMXConnectorServer
 100         JMXConnectorServer}.  Usually, this instance is created
 101         using the method {@link
 102         javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer(JMXServiceURL,
 103         java.util.Map, javax.management.MBeanServer)
 104         JMXConnectorServerFactory.newJMXConnectorServer}.</p>
 105 
 106       <p>Typically, a connector server is associated with an MBean
 107         server either by registering it in that MBean server, or by
 108         supplying the MBean server as a parameter when creating the
 109         connector server.</p>
 110 
 111       <h2>Creating a connector client</h2>
 112 
 113       <p>A connector client is usually created by supplying the
 114         <code>JMXServiceURL</code> of the connector server to connect to 
 115         to the {@link
 116         javax.management.remote.JMXConnectorFactory#connect(JMXServiceURL)
 117         JMXConnectorFactory.connect} method.</p>
 118 
 119       <p>For more specialized uses, a connector client can be created
 120         by directly instantiating a class that implements the {@link
 121         javax.management.remote.JMXConnector JMXConnector} interface,
 122         for example the class {@link
 123         javax.management.remote.rmi.RMIConnector
 124         RMIConnector}.</p>
 125 
 126       <h2>Additional client or server parameters</h2>
 127 
 128       <p>When creating a connector client or server, it is possible to
 129         supply an object of type {@link java.util.Map Map} that defines
 130         additional parameters.  Each entry in this Map has a key that is
 131         a string and an associated value whose type is appropriate for
 132         that key.  The standard keys defined by the JMX Remote API all
 133         begin with the string "<code>jmx.remote.</code>".  The document
 134         <em>JMX Remote API</em> lists these standard keys.</p>
 135 
 136       <h2>Connection identifiers</h2>
 137 
 138       <p>Every connection opened by a connector server has a string
 139         identifier, called its <b>connection id</b>.  This identifier
 140         appears in the {@link
 141         javax.management.remote.JMXConnectionNotification
 142         JMXConnectionNotification} events emitted by the connector
 143         server, in the list returned by {@link
 144         javax.management.remote.JMXConnectorServerMBean#getConnectionIds()
 145         getConnectionIds()}, and in the value
 146         returned by the client's {@link
 147         javax.management.remote.JMXConnector#getConnectionId()
 148         getConnectionId()} method.</p>
 149 
 150       <p>As an example, a connection ID can look something like this:</p>
 151 
 152       <pre>
 153 rmi://192.18.1.9 username 1
 154       </pre>
 155 
 156       <p>The formal grammar for connection ids that follow this


   1 <html>
   2 <head>
   3     <title>JMX&trade; Remote API.</title>
   4 <!--
   5 Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
   6 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7 
   8 This code is free software; you can redistribute it and/or modify it
   9 under the terms of the GNU General Public License version 2 only, as
  10 published by the Free Software Foundation.  Oracle designates this
  11 particular file as subject to the "Classpath" exception as provided
  12 by Oracle in the LICENSE file that accompanied this code.
  13 
  14 This code is distributed in the hope that it will be useful, but WITHOUT
  15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17 version 2 for more details (a copy is included in the LICENSE file that
  18 accompanied this code).
  19 
  20 You should have received a copy of the GNU General Public License version
  21 2 along with this work; if not, write to the Free Software Foundation,
  22 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  23 
  24 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  25 or visit www.oracle.com if you need additional information or have any


  54 
  55        <li>The JMX Remote API also defines an optional connector called 
  56         <b>JMXMP Connector</b> implementing the JMX Message Protocol 
  57         (JMXMP). As it is optional, it is not part of this bundle (see
  58         note below).
  59 
  60        <li>User-defined connector protocols are also possible using the 
  61         {@link javax.management.remote.JMXConnectorFactory
  62         JMXConnectorFactory} and, optionally, the Generic Connector
  63         (not part of this bundle, see note below).
  64       </ul>
  65 
  66       <p><u>Note</u>: the optional packages implementing
  67         the optional part of the <em>JMX Remote API</em>
  68         are not included in the <em>Java SE Platform</em> 
  69         but are available from the <em>JMX Remote API 
  70         <a href="http://java.sun.com/products/JavaManagement/download.html">
  71         Reference Implementation</a></em>.</p>
  72 
  73 
  74       <h3>Connector addresses</h3>
  75 
  76       <p>Typically, a connector server has an address, represented by the
  77         class {@link javax.management.remote.JMXServiceURL
  78         JMXServiceURL}.  An address for the RMI Connector can look
  79         like this:</p>
  80 
  81       <pre>
  82       service:jmx:rmi:///jndi/rmi://myhost:1099/myname
  83       </pre>
  84 
  85       <p>In this <code>JMXServiceURL</code>, the first <code>rmi:</code>
  86         specifies the RMI connector, while the second <code>rmi:</code> 
  87         specifies the RMI registry into which the RMI connector server 
  88         has stored its stub.
  89 
  90       <p>The example above shows only one form of address.
  91         An address for the RMI Connector can take several forms,
  92         as detailed in the documentation for the package
  93         <code>{@link javax.management.remote.rmi}</code>.</p>
  94 
  95       <h3>Creating a connector server</h3>
  96 
  97       <p>A connector server is created by constructing an instance of
  98         a subclass of {@link
  99         javax.management.remote.JMXConnectorServer
 100         JMXConnectorServer}.  Usually, this instance is created
 101         using the method {@link
 102         javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer(JMXServiceURL,
 103         java.util.Map, javax.management.MBeanServer)
 104         JMXConnectorServerFactory.newJMXConnectorServer}.</p>
 105 
 106       <p>Typically, a connector server is associated with an MBean
 107         server either by registering it in that MBean server, or by
 108         supplying the MBean server as a parameter when creating the
 109         connector server.</p>
 110 
 111       <h3>Creating a connector client</h3>
 112 
 113       <p>A connector client is usually created by supplying the
 114         <code>JMXServiceURL</code> of the connector server to connect to 
 115         to the {@link
 116         javax.management.remote.JMXConnectorFactory#connect(JMXServiceURL)
 117         JMXConnectorFactory.connect} method.</p>
 118 
 119       <p>For more specialized uses, a connector client can be created
 120         by directly instantiating a class that implements the {@link
 121         javax.management.remote.JMXConnector JMXConnector} interface,
 122         for example the class {@link
 123         javax.management.remote.rmi.RMIConnector
 124         RMIConnector}.</p>
 125 
 126       <h3>Additional client or server parameters</h3>
 127 
 128       <p>When creating a connector client or server, it is possible to
 129         supply an object of type {@link java.util.Map Map} that defines
 130         additional parameters.  Each entry in this Map has a key that is
 131         a string and an associated value whose type is appropriate for
 132         that key.  The standard keys defined by the JMX Remote API all
 133         begin with the string "<code>jmx.remote.</code>".  The document
 134         <em>JMX Remote API</em> lists these standard keys.</p>
 135 
 136       <h3>Connection identifiers</h3>
 137 
 138       <p>Every connection opened by a connector server has a string
 139         identifier, called its <b>connection id</b>.  This identifier
 140         appears in the {@link
 141         javax.management.remote.JMXConnectionNotification
 142         JMXConnectionNotification} events emitted by the connector
 143         server, in the list returned by {@link
 144         javax.management.remote.JMXConnectorServerMBean#getConnectionIds()
 145         getConnectionIds()}, and in the value
 146         returned by the client's {@link
 147         javax.management.remote.JMXConnector#getConnectionId()
 148         getConnectionId()} method.</p>
 149 
 150       <p>As an example, a connection ID can look something like this:</p>
 151 
 152       <pre>
 153 rmi://192.18.1.9 username 1
 154       </pre>
 155 
 156       <p>The formal grammar for connection ids that follow this


< prev index next >