KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > core > modules > jsr160 > JSR160ServerConnection


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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  */

16 package org.jmanage.core.modules.jsr160;
17
18 import org.jmanage.core.management.*;
19 import org.jmanage.core.management.ObjectName;
20 import org.jmanage.core.modules.JMXServerConnection;
21
22 import javax.management.*;
23 import javax.management.remote.JMXConnector JavaDoc;
24 import java.util.*;
25 import java.io.IOException JavaDoc;
26
27 /**
28  *
29  * date: Aug 12, 2004
30  * @author Rakesh Kalra
31  */

32 public class JSR160ServerConnection extends JMXServerConnection{
33
34     private final JMXConnector JavaDoc jmxc;
35     private final MBeanServerConnection mbeanServer;
36
37     public JSR160ServerConnection(JMXConnector JavaDoc jmxc,
38                                   MBeanServerConnection mbeanServer)
39         throws IOException JavaDoc {
40         super(mbeanServer, MBeanServerConnection.class);
41         assert jmxc != null;
42         this.jmxc = jmxc;
43         this.mbeanServer = mbeanServer;
44     }
45
46     /**
47      * Closes the connection to the server
48      */

49     public void close() throws IOException JavaDoc {
50         jmxc.close();
51     }
52 }
53
54
55
Popular Tags