feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.iiop;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.management.remote.JMXConnectorProvider;
|
||||
import javax.management.remote.JMXConnector;
|
||||
import javax.management.remote.JMXServiceURL;
|
||||
import javax.management.remote.rmi.RMIConnector;
|
||||
|
||||
public class ClientProvider implements JMXConnectorProvider {
|
||||
|
||||
public JMXConnector newJMXConnector(JMXServiceURL serviceURL,
|
||||
Map<String,?> environment)
|
||||
throws IOException {
|
||||
if (!serviceURL.getProtocol().equals("iiop")) {
|
||||
throw new MalformedURLException("Protocol not iiop: " +
|
||||
serviceURL.getProtocol());
|
||||
}
|
||||
return new RMIConnector(serviceURL, environment);
|
||||
}
|
||||
}
|
||||
157
jdkSrc/jdk8/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java
Normal file
157
jdkSrc/jdk8/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* Copyright (c) 2009,2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.iiop;
|
||||
|
||||
import org.omg.CORBA.ORB;
|
||||
import org.omg.CORBA.portable.Delegate;
|
||||
import javax.rmi.PortableRemoteObject;
|
||||
import javax.rmi.CORBA.Stub;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.NoSuchObjectException;
|
||||
|
||||
import com.sun.jmx.remote.internal.IIOPProxy;
|
||||
import java.io.SerializablePermission;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.Permissions;
|
||||
import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
/**
|
||||
* An implementation of IIOPProxy that simply delegates to the appropriate
|
||||
* RMI-IIOP and CORBA APIs.
|
||||
*/
|
||||
|
||||
public class IIOPProxyImpl implements IIOPProxy {
|
||||
// special ACC used to initialize the IIOP stub
|
||||
// the only allowed privilege is SerializablePermission("enableSubclassImplementation")
|
||||
private static final AccessControlContext STUB_ACC;
|
||||
|
||||
static {
|
||||
Permissions p = new Permissions();
|
||||
p.add(new SerializablePermission("enableSubclassImplementation"));
|
||||
STUB_ACC = new AccessControlContext(
|
||||
new ProtectionDomain[]{
|
||||
new ProtectionDomain(null, p)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public IIOPProxyImpl() { }
|
||||
|
||||
@Override
|
||||
public boolean isStub(Object obj) {
|
||||
return (obj instanceof Stub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getDelegate(Object stub) {
|
||||
return ((Stub)stub)._get_delegate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDelegate(Object stub, Object delegate) {
|
||||
((Stub)stub)._set_delegate((Delegate)delegate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOrb(Object stub) {
|
||||
try {
|
||||
return ((Stub)stub)._orb();
|
||||
} catch (org.omg.CORBA.BAD_OPERATION x) {
|
||||
throw new UnsupportedOperationException(x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connect(Object stub, Object orb)
|
||||
throws RemoteException
|
||||
{
|
||||
((Stub)stub).connect((ORB)orb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOrb(Object obj) {
|
||||
return (obj instanceof ORB);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object createOrb(String[] args, Properties props) {
|
||||
return ORB.init(args, props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object stringToObject(Object orb, String str) {
|
||||
return ((ORB)orb).string_to_object(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String objectToString(Object orb, Object obj) {
|
||||
return ((ORB)orb).object_to_string((org.omg.CORBA.Object)obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T narrow(Object narrowFrom, Class<T> narrowTo) {
|
||||
return (T)PortableRemoteObject.narrow(narrowFrom, narrowTo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportObject(Remote obj) throws RemoteException {
|
||||
PortableRemoteObject.exportObject(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unexportObject(Remote obj) throws NoSuchObjectException {
|
||||
PortableRemoteObject.unexportObject(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Remote toStub(final Remote obj) throws NoSuchObjectException {
|
||||
if (System.getSecurityManager() == null) {
|
||||
return PortableRemoteObject.toStub(obj);
|
||||
} else {
|
||||
try {
|
||||
return AccessController.doPrivileged(new PrivilegedExceptionAction<Remote>() {
|
||||
|
||||
@Override
|
||||
public Remote run() throws Exception {
|
||||
return PortableRemoteObject.toStub(obj);
|
||||
}
|
||||
}, STUB_ACC);
|
||||
} catch (PrivilegedActionException e) {
|
||||
if (e.getException() instanceof NoSuchObjectException) {
|
||||
throw (NoSuchObjectException)e.getException();
|
||||
}
|
||||
throw new RuntimeException("Unexpected exception type", e.getException());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.iiop;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.omg.CORBA.Any;
|
||||
import org.omg.CORBA.Context;
|
||||
import org.omg.CORBA.NO_IMPLEMENT;
|
||||
import org.omg.CORBA.ORB;
|
||||
import org.omg.CORBA.TypeCode;
|
||||
import org.omg.CORBA.portable.BoxedValueHelper;
|
||||
|
||||
@SuppressWarnings({"deprecation", "rawtypes"})
|
||||
public class ProxyInputStream extends org.omg.CORBA_2_3.portable.InputStream {
|
||||
public ProxyInputStream(org.omg.CORBA.portable.InputStream in) {
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
public boolean read_boolean() {
|
||||
return in.read_boolean();
|
||||
}
|
||||
|
||||
public char read_char() {
|
||||
return in.read_char();
|
||||
}
|
||||
|
||||
public char read_wchar() {
|
||||
return in.read_wchar();
|
||||
}
|
||||
|
||||
public byte read_octet() {
|
||||
return in.read_octet();
|
||||
}
|
||||
|
||||
public short read_short() {
|
||||
return in.read_short();
|
||||
}
|
||||
|
||||
public short read_ushort() {
|
||||
return in.read_ushort();
|
||||
}
|
||||
|
||||
public int read_long() {
|
||||
return in.read_long();
|
||||
}
|
||||
|
||||
public int read_ulong() {
|
||||
return in.read_ulong();
|
||||
}
|
||||
|
||||
public long read_longlong() {
|
||||
return in.read_longlong();
|
||||
}
|
||||
|
||||
public long read_ulonglong() {
|
||||
return in.read_ulonglong();
|
||||
}
|
||||
|
||||
public float read_float() {
|
||||
return in.read_float();
|
||||
}
|
||||
|
||||
public double read_double() {
|
||||
return in.read_double();
|
||||
}
|
||||
|
||||
public String read_string() {
|
||||
return in.read_string();
|
||||
}
|
||||
|
||||
public String read_wstring() {
|
||||
return in.read_wstring();
|
||||
}
|
||||
|
||||
public void read_boolean_array(boolean[] value, int offset, int length) {
|
||||
in.read_boolean_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_char_array(char[] value, int offset, int length) {
|
||||
in.read_char_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_wchar_array(char[] value, int offset, int length) {
|
||||
in.read_wchar_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_octet_array(byte[] value, int offset, int length) {
|
||||
in.read_octet_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_short_array(short[] value, int offset, int length) {
|
||||
in.read_short_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_ushort_array(short[] value, int offset, int length) {
|
||||
in.read_ushort_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_long_array(int[] value, int offset, int length) {
|
||||
in.read_long_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_ulong_array(int[] value, int offset, int length) {
|
||||
in.read_ulong_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_longlong_array(long[] value, int offset, int length) {
|
||||
in.read_longlong_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_ulonglong_array(long[] value, int offset, int length) {
|
||||
in.read_ulonglong_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_float_array(float[] value, int offset, int length) {
|
||||
in.read_float_array(value, offset, length);
|
||||
}
|
||||
|
||||
public void read_double_array(double[] value, int offset, int length) {
|
||||
in.read_double_array(value, offset, length);
|
||||
}
|
||||
|
||||
public org.omg.CORBA.Object read_Object() {
|
||||
return in.read_Object();
|
||||
}
|
||||
|
||||
public TypeCode read_TypeCode() {
|
||||
return in.read_TypeCode();
|
||||
}
|
||||
|
||||
public Any read_any() {
|
||||
return in.read_any();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public org.omg.CORBA.Principal read_Principal() {
|
||||
return in.read_Principal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
return in.read();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal read_fixed() {
|
||||
return in.read_fixed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context read_Context() {
|
||||
return in.read_Context();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.omg.CORBA.Object read_Object(java.lang.Class clz) {
|
||||
return in.read_Object(clz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ORB orb() {
|
||||
return in.orb();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable read_value() {
|
||||
return narrow().read_value();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable read_value(Class clz) {
|
||||
return narrow().read_value(clz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable read_value(BoxedValueHelper factory) {
|
||||
return narrow().read_value(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable read_value(String rep_id) {
|
||||
return narrow().read_value(rep_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable read_value(Serializable value) {
|
||||
return narrow().read_value(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object read_abstract_interface() {
|
||||
return narrow().read_abstract_interface();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object read_abstract_interface(Class clz) {
|
||||
return narrow().read_abstract_interface(clz);
|
||||
}
|
||||
|
||||
protected org.omg.CORBA_2_3.portable.InputStream narrow() {
|
||||
if (in instanceof org.omg.CORBA_2_3.portable.InputStream)
|
||||
return (org.omg.CORBA_2_3.portable.InputStream) in;
|
||||
throw new NO_IMPLEMENT();
|
||||
}
|
||||
|
||||
public org.omg.CORBA.portable.InputStream getProxiedInputStream() {
|
||||
return in;
|
||||
}
|
||||
|
||||
protected final org.omg.CORBA.portable.InputStream in;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.iiop;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.management.MBeanServer;
|
||||
import javax.management.remote.JMXConnectorServer;
|
||||
import javax.management.remote.JMXConnectorServerProvider;
|
||||
import javax.management.remote.JMXServiceURL;
|
||||
import javax.management.remote.rmi.RMIConnectorServer;
|
||||
|
||||
public class ServerProvider implements JMXConnectorServerProvider {
|
||||
|
||||
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL,
|
||||
Map<String,?> environment,
|
||||
MBeanServer mbeanServer)
|
||||
throws IOException {
|
||||
if (!serviceURL.getProtocol().equals("iiop")) {
|
||||
throw new MalformedURLException("Protocol not iiop: " +
|
||||
serviceURL.getProtocol());
|
||||
}
|
||||
return new RMIConnectorServer(serviceURL, environment, mbeanServer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.rmi;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.management.remote.JMXConnectorProvider;
|
||||
import javax.management.remote.JMXConnector;
|
||||
import javax.management.remote.JMXServiceURL;
|
||||
import javax.management.remote.rmi.RMIConnector;
|
||||
|
||||
public class ClientProvider implements JMXConnectorProvider {
|
||||
|
||||
public JMXConnector newJMXConnector(JMXServiceURL serviceURL,
|
||||
Map<String,?> environment)
|
||||
throws IOException {
|
||||
if (!serviceURL.getProtocol().equals("rmi")) {
|
||||
throw new MalformedURLException("Protocol not rmi: " +
|
||||
serviceURL.getProtocol());
|
||||
}
|
||||
return new RMIConnector(serviceURL, environment);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* 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. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle 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
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.jmx.remote.protocol.rmi;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.management.MBeanServer;
|
||||
import javax.management.remote.JMXConnectorServer;
|
||||
import javax.management.remote.JMXConnectorServerProvider;
|
||||
import javax.management.remote.JMXServiceURL;
|
||||
import javax.management.remote.rmi.RMIConnectorServer;
|
||||
|
||||
public class ServerProvider implements JMXConnectorServerProvider {
|
||||
|
||||
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL,
|
||||
Map<String,?> environment,
|
||||
MBeanServer mbeanServer)
|
||||
throws IOException {
|
||||
if (!serviceURL.getProtocol().equals("rmi")) {
|
||||
throw new MalformedURLException("Protocol not rmi: " +
|
||||
serviceURL.getProtocol());
|
||||
}
|
||||
return new RMIConnectorServer(serviceURL, environment, mbeanServer);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user