01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package javax.management.remote;
10:
11: import java.io.IOException;
12: import java.util.HashMap;
13: import java.util.Map;
14:
15: import javax.management.MBeanServer;
16:
17: import mx4j.remote.ProviderFactory;
18:
19: /**
20: * @version $Revision: 1.7 $
21: */
22: public class JMXConnectorServerFactory {
23: public static final String DEFAULT_CLASS_LOADER = "jmx.remote.default.class.loader";
24: public static final String DEFAULT_CLASS_LOADER_NAME = "jmx.remote.default.class.loader.name";
25: public static final String PROTOCOL_PROVIDER_PACKAGES = "jmx.remote.protocol.provider.pkgs";
26: public static final String PROTOCOL_PROVIDER_CLASS_LOADER = "jmx.remote.protocol.provider.class.loader";
27:
28: private JMXConnectorServerFactory() {
29: }
30:
31: public static JMXConnectorServer newJMXConnectorServer(
32: JMXServiceURL url, Map environment, MBeanServer server)
33: throws IOException {
34: Map env = environment == null ? new HashMap() : new HashMap(
35: environment);
36: JMXConnectorServer connector = ProviderFactory
37: .newJMXConnectorServer(url, env, server);
38: return connector;
39: }
40: }
|