< prev index next >

src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java

Print this page


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


 111  * underlying exception, as follows:</p>
 112  *
 113  * <ul>
 114  *
 115  * <li>if the attempt to load the class produces an exception other
 116  * than <code>ClassNotFoundException</code>, that is the
 117  * <em>cause</em>;
 118  *
 119  * <li>if {@link Class#newInstance()} for the class produces an
 120  * exception, that is the <em>cause</em>.
 121  *
 122  * </ul>
 123  *
 124  * <p>If no provider is found by the above steps, including the
 125  * default case where there is no provider package list, then the
 126  * implementation will use its own provider for
 127  * <code><em>protocol</em></code>, or it will throw a
 128  * <code>MalformedURLException</code> if there is none.  An
 129  * implementation may choose to find providers by other means.  For
 130  * example, it may support <a
 131  * href="{@docRoot}/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
 132  * where the service interface is <code>JMXConnectorServerProvider</code>.</p>
 133  *
 134  * <p>Every implementation must support the RMI connector protocol with
 135  * the default RMI transport, specified with string <code>rmi</code>.
 136  * </p>
 137  *
 138  * <p>Once a provider is found, the result of the
 139  * <code>newJMXConnectorServer</code> method is the result of calling
 140  * {@link
 141  * JMXConnectorServerProvider#newJMXConnectorServer(JMXServiceURL,
 142  * Map, MBeanServer) newJMXConnectorServer} on the provider.</p>
 143  *
 144  * <p>The <code>Map</code> parameter passed to the
 145  * <code>JMXConnectorServerProvider</code> is a new read-only
 146  * <code>Map</code> that contains all the entries that were in the
 147  * <code>environment</code> parameter to {@link
 148  * #newJMXConnectorServer(JMXServiceURL,Map,MBeanServer)
 149  * JMXConnectorServerFactory.newJMXConnectorServer}, if there was one.
 150  * Additionally, if the
 151  * <code>jmx.remote.protocol.provider.class.loader</code> key is not


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


 111  * underlying exception, as follows:</p>
 112  *
 113  * <ul>
 114  *
 115  * <li>if the attempt to load the class produces an exception other
 116  * than <code>ClassNotFoundException</code>, that is the
 117  * <em>cause</em>;
 118  *
 119  * <li>if {@link Class#newInstance()} for the class produces an
 120  * exception, that is the <em>cause</em>.
 121  *
 122  * </ul>
 123  *
 124  * <p>If no provider is found by the above steps, including the
 125  * default case where there is no provider package list, then the
 126  * implementation will use its own provider for
 127  * <code><em>protocol</em></code>, or it will throw a
 128  * <code>MalformedURLException</code> if there is none.  An
 129  * implementation may choose to find providers by other means.  For
 130  * example, it may support <a
 131  * href="{@docRoot}/java.base/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
 132  * where the service interface is <code>JMXConnectorServerProvider</code>.</p>
 133  *
 134  * <p>Every implementation must support the RMI connector protocol with
 135  * the default RMI transport, specified with string <code>rmi</code>.
 136  * </p>
 137  *
 138  * <p>Once a provider is found, the result of the
 139  * <code>newJMXConnectorServer</code> method is the result of calling
 140  * {@link
 141  * JMXConnectorServerProvider#newJMXConnectorServer(JMXServiceURL,
 142  * Map, MBeanServer) newJMXConnectorServer} on the provider.</p>
 143  *
 144  * <p>The <code>Map</code> parameter passed to the
 145  * <code>JMXConnectorServerProvider</code> is a new read-only
 146  * <code>Map</code> that contains all the entries that were in the
 147  * <code>environment</code> parameter to {@link
 148  * #newJMXConnectorServer(JMXServiceURL,Map,MBeanServer)
 149  * JMXConnectorServerFactory.newJMXConnectorServer}, if there was one.
 150  * Additionally, if the
 151  * <code>jmx.remote.protocol.provider.class.loader</code> key is not


< prev index next >