1/*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27package com.sun.org.glassfish.gmbal;
28
29import javax.management.Attribute;
30import javax.management.AttributeList;
31import javax.management.AttributeNotFoundException;
32import javax.management.InvalidAttributeValueException;
33import javax.management.ListenerNotFoundException;
34import javax.management.MBeanException;
35import javax.management.MBeanInfo;
36import javax.management.MBeanNotificationInfo;
37import javax.management.NotificationFilter;
38import javax.management.NotificationListener;
39import javax.management.ReflectionException;
40
41/** A simple no-op implementation of GmbalMBean for use in the no-op impl of
42 * ManagedObjectManager.
43 *
44 * @author ken
45 */
46public class GmbalMBeanNOPImpl implements GmbalMBean {
47    public Object getAttribute(String attribute)
48        throws AttributeNotFoundException, MBeanException, ReflectionException {
49
50        return null ;
51    }
52
53    public void setAttribute(Attribute attribute)
54        throws AttributeNotFoundException, InvalidAttributeValueException,
55            MBeanException, ReflectionException {
56
57        // NO-OP
58    }
59
60    public AttributeList getAttributes(String[] attributes) {
61        return null ;
62    }
63
64    public AttributeList setAttributes(AttributeList attributes) {
65        return null ;
66    }
67
68    public Object invoke(String actionName, Object[] params, String[] signature)
69        throws MBeanException, ReflectionException {
70
71        return null ;
72    }
73
74    public MBeanInfo getMBeanInfo() {
75        return null ;
76    }
77
78    public void removeNotificationListener(NotificationListener listener,
79        NotificationFilter filter, Object handback)
80        throws ListenerNotFoundException {
81
82        // NO-OP
83    }
84
85    public void addNotificationListener(NotificationListener listener,
86        NotificationFilter filter, Object handback) throws IllegalArgumentException {
87
88        // NO-OP
89    }
90
91    public void removeNotificationListener(NotificationListener listener)
92        throws ListenerNotFoundException {
93
94        // NO-OP
95    }
96
97    public MBeanNotificationInfo[] getNotificationInfo() {
98        return new MBeanNotificationInfo[0] ;
99    }
100
101}
102