1 /* |
|
2 * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 * have any questions. |
|
24 */ |
|
25 |
|
26 package com.sun.jmx.interceptor; |
|
27 |
|
28 import java.io.ObjectInputStream; |
|
29 import javax.management.InstanceNotFoundException; |
|
30 import javax.management.MBeanException; |
|
31 import javax.management.ObjectName; |
|
32 import javax.management.OperationsException; |
|
33 import javax.management.ReflectionException; |
|
34 import javax.management.loading.ClassLoaderRepository; |
|
35 |
|
36 /** |
|
37 * An abstract class for MBeanServerInterceptorSupport. |
|
38 * Some methods in MBeanServerInterceptor should never be called. |
|
39 * This base class provides an implementation of these methods that simply |
|
40 * throw an {@link UnsupportedOperationException}. |
|
41 * <p><b> |
|
42 * This API is a Sun internal API and is subject to changes without notice. |
|
43 * </b></p> |
|
44 * @since 1.7 |
|
45 */ |
|
46 public abstract class MBeanServerInterceptorSupport |
|
47 implements MBeanServerInterceptor { |
|
48 /** |
|
49 * This method should never be called. |
|
50 * Throws UnsupportedOperationException. |
|
51 */ |
|
52 public Object instantiate(String className) |
|
53 throws ReflectionException, MBeanException { |
|
54 throw new UnsupportedOperationException("Not applicable."); |
|
55 } |
|
56 |
|
57 /** |
|
58 * This method should never be called. |
|
59 * Throws UnsupportedOperationException. |
|
60 */ |
|
61 public Object instantiate(String className, ObjectName loaderName) |
|
62 throws ReflectionException, MBeanException, |
|
63 InstanceNotFoundException { |
|
64 throw new UnsupportedOperationException("Not applicable."); |
|
65 } |
|
66 |
|
67 /** |
|
68 * This method should never be called. |
|
69 * Throws UnsupportedOperationException. |
|
70 */ |
|
71 public Object instantiate(String className, Object[] params, |
|
72 String[] signature) throws ReflectionException, MBeanException { |
|
73 throw new UnsupportedOperationException("Not applicable."); |
|
74 } |
|
75 |
|
76 /** |
|
77 * This method should never be called. |
|
78 * Throws UnsupportedOperationException. |
|
79 */ |
|
80 public Object instantiate(String className, ObjectName loaderName, |
|
81 Object[] params, String[] signature) |
|
82 throws ReflectionException, MBeanException, |
|
83 InstanceNotFoundException { |
|
84 throw new UnsupportedOperationException("Not applicable."); |
|
85 } |
|
86 |
|
87 /** |
|
88 * This method should never be called. |
|
89 * Throws UnsupportedOperationException. |
|
90 */ |
|
91 @Deprecated |
|
92 public ObjectInputStream deserialize(ObjectName name, byte[] data) |
|
93 throws InstanceNotFoundException, OperationsException { |
|
94 throw new UnsupportedOperationException("Not applicable."); |
|
95 } |
|
96 |
|
97 /** |
|
98 * This method should never be called. |
|
99 * Throws UnsupportedOperationException. |
|
100 */ |
|
101 @Deprecated |
|
102 public ObjectInputStream deserialize(String className, byte[] data) |
|
103 throws OperationsException, ReflectionException { |
|
104 throw new UnsupportedOperationException("Not applicable."); |
|
105 } |
|
106 |
|
107 /** |
|
108 * This method should never be called. |
|
109 * Throws UnsupportedOperationException. |
|
110 */ |
|
111 @Deprecated |
|
112 public ObjectInputStream deserialize(String className, |
|
113 ObjectName loaderName, byte[] data) |
|
114 throws InstanceNotFoundException, OperationsException, |
|
115 ReflectionException { |
|
116 throw new UnsupportedOperationException("Not applicable."); |
|
117 } |
|
118 |
|
119 /** |
|
120 * This method should never be called. |
|
121 * Throws UnsupportedOperationException. |
|
122 */ |
|
123 public ClassLoaderRepository getClassLoaderRepository() { |
|
124 throw new UnsupportedOperationException("Not applicable."); |
|
125 } |
|
126 |
|
127 } |
|