01: /**
02: * Copyright 2004-2005 jManage.org
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */package org.jmanage.core.modules.jsr160;
16:
17: import org.jmanage.core.management.*;
18: import org.jmanage.core.management.ObjectName;
19: import org.jmanage.core.modules.JMXServerConnection;
20:
21: import javax.management.*;
22: import javax.management.remote.JMXConnector;
23: import java.util.*;
24: import java.io.IOException;
25:
26: /**
27: *
28: * date: Aug 12, 2004
29: * @author Rakesh Kalra
30: */
31: public class JSR160ServerConnection extends JMXServerConnection {
32:
33: private final JMXConnector jmxc;
34: private final MBeanServerConnection mbeanServer;
35:
36: public JSR160ServerConnection(JMXConnector jmxc,
37: MBeanServerConnection mbeanServer) throws IOException {
38: super (mbeanServer, MBeanServerConnection.class);
39: assert jmxc != null;
40: this .jmxc = jmxc;
41: this .mbeanServer = mbeanServer;
42: }
43:
44: /**
45: * Closes the connection to the server
46: */
47: public void close() throws IOException {
48: jmxc.close();
49: }
50: }
|