KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > support > Delegate


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24 /*
25  * $Header: /cvs/glassfish/admin/mbeanapi-impl/src/java/com/sun/enterprise/management/support/Delegate.java,v 1.2 2005/12/25 03:40:40 tcfujii Exp $
26  * $Revision: 1.2 $
27  * $Date: 2005/12/25 03:40:40 $
28  */

29
30 package com.sun.enterprise.management.support;
31
32 import javax.management.ObjectName JavaDoc;
33 import javax.management.MBeanInfo JavaDoc;
34 import javax.management.AttributeList JavaDoc;
35 import javax.management.Attribute JavaDoc;
36 import javax.management.AttributeNotFoundException JavaDoc;
37 import javax.management.InvalidAttributeValueException JavaDoc;
38 import javax.management.InstanceNotFoundException JavaDoc;
39 import javax.management.ReflectionException JavaDoc;
40 import javax.management.MBeanException JavaDoc;
41
42
43
44 /**
45     Interface for delegating responsibility for handling Attribute getters/setters
46     as well as invoke().
47  */

48 public interface Delegate
49 {
50     /**
51         An arbitrary (but hopefully meaningful) identifier
52         for this Delegate.
53      */

54     public String JavaDoc getID();
55     
56     public Object JavaDoc getAttribute( String JavaDoc attrName )
57         throws AttributeNotFoundException JavaDoc;
58
59     public AttributeList JavaDoc getAttributes( final String JavaDoc[] attrNames );
60     
61     public void setAttribute( final Attribute JavaDoc attrName )
62         throws AttributeNotFoundException JavaDoc,
63                 InvalidAttributeValueException JavaDoc;
64     
65     public AttributeList JavaDoc setAttributes( final AttributeList JavaDoc mappedAttrs );
66     
67     /**
68         Return true if the Attribute is supported
69      */

70     public boolean supportsAttribute( String JavaDoc name );
71     
72     /**
73         Return true if the operation is supported
74      */

75     public boolean supportsOperation(
76         String JavaDoc operationName,
77         Object JavaDoc[] args,
78         String JavaDoc[] types );
79     
80     /**
81         Get the MBeanInfo this delegate wishes to make visible.
82      */

83     public MBeanInfo JavaDoc getMBeanInfo();
84     
85     /**
86         invoke the operation.
87      */

88     public Object JavaDoc invoke(
89         String JavaDoc operationName,
90         Object JavaDoc[] args,
91         String JavaDoc[] types );
92         
93     
94     public void setOwner( DelegateOwner owner );
95 }
96
97
98
99
100
101
102
103
104
Popular Tags