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

Print this page


   1 /*
   2  * Copyright (c) 2002, 2008, 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


 117  * exception, as follows:</p>
 118  *
 119  * <ul>
 120  *
 121  * <li>if the attempt to load the class produces an exception other
 122  * than <code>ClassNotFoundException</code>, that is the
 123  * <em>cause</em>;
 124  *
 125  * <li>if {@link Class#newInstance()} for the class produces an
 126  * exception, that is the <em>cause</em>.
 127  *
 128  * </ul>
 129  *
 130  * <p>If no provider is found by the above steps, including the
 131  * default case where there is no provider package list, then the
 132  * implementation will use its own provider for
 133  * <code><em>protocol</em></code>, or it will throw a
 134  * <code>MalformedURLException</code> if there is none.  An
 135  * implementation may choose to find providers by other means.  For
 136  * example, it may support the <a
 137  * href="{@docRoot}/../technotes/guides/jar/jar.html#Service Provider">
 138  * JAR conventions for service providers</a>, where the service
 139  * interface is <code>JMXConnectorProvider</code>.</p>
 140  *
 141  * <p>Every implementation must support the RMI connector protocol with
 142  * the default RMI transport, specified with string <code>rmi</code>.
 143  * An implementation may optionally support the RMI connector protocol
 144  * with the RMI/IIOP transport, specified with the string
 145  * <code>iiop</code>.</p>
 146  *
 147  * <p>Once a provider is found, the result of the
 148  * <code>newJMXConnector</code> method is the result of calling {@link
 149  * JMXConnectorProvider#newJMXConnector(JMXServiceURL,Map) newJMXConnector}
 150  * on the provider.</p>
 151  *
 152  * <p>The <code>Map</code> parameter passed to the
 153  * <code>JMXConnectorProvider</code> is a new read-only
 154  * <code>Map</code> that contains all the entries that were in the
 155  * <code>environment</code> parameter to {@link
 156  * #newJMXConnector(JMXServiceURL,Map)
 157  * JMXConnectorFactory.newJMXConnector}, if there was one.


   1 /*
   2  * Copyright (c) 2002, 2013, 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


 117  * exception, as follows:</p>
 118  *
 119  * <ul>
 120  *
 121  * <li>if the attempt to load the class produces an exception other
 122  * than <code>ClassNotFoundException</code>, that is the
 123  * <em>cause</em>;
 124  *
 125  * <li>if {@link Class#newInstance()} for the class produces an
 126  * exception, that is the <em>cause</em>.
 127  *
 128  * </ul>
 129  *
 130  * <p>If no provider is found by the above steps, including the
 131  * default case where there is no provider package list, then the
 132  * implementation will use its own provider for
 133  * <code><em>protocol</em></code>, or it will throw a
 134  * <code>MalformedURLException</code> if there is none.  An
 135  * implementation may choose to find providers by other means.  For
 136  * example, it may support the <a
 137  * href="{@docRoot}/../technotes/guides/jar/jar.html#Service%20Provider">
 138  * JAR conventions for service providers</a>, where the service
 139  * interface is <code>JMXConnectorProvider</code>.</p>
 140  *
 141  * <p>Every implementation must support the RMI connector protocol with
 142  * the default RMI transport, specified with string <code>rmi</code>.
 143  * An implementation may optionally support the RMI connector protocol
 144  * with the RMI/IIOP transport, specified with the string
 145  * <code>iiop</code>.</p>
 146  *
 147  * <p>Once a provider is found, the result of the
 148  * <code>newJMXConnector</code> method is the result of calling {@link
 149  * JMXConnectorProvider#newJMXConnector(JMXServiceURL,Map) newJMXConnector}
 150  * on the provider.</p>
 151  *
 152  * <p>The <code>Map</code> parameter passed to the
 153  * <code>JMXConnectorProvider</code> is a new read-only
 154  * <code>Map</code> that contains all the entries that were in the
 155  * <code>environment</code> parameter to {@link
 156  * #newJMXConnector(JMXServiceURL,Map)
 157  * JMXConnectorFactory.newJMXConnector}, if there was one.