KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > cli > jmx > support > CLISupportMBean


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-cli/cli-api/src/java/com/sun/cli/jmx/support/CLISupportMBean.java,v 1.3 2005/12/25 03:45:46 tcfujii Exp $
26  * $Revision: 1.3 $
27  * $Date: 2005/12/25 03:45:46 $
28  */

29  
30
31 /*
32     The MBean interface for CLI support.
33  */

34  
35 package com.sun.cli.jmx.support;
36
37 import javax.management.*;
38 import java.io.IOException JavaDoc;
39
40
41
42 public interface CLISupportMBean
43 {
44     
45     /*
46         Supports the get CLI command
47         
48         @param attrs comma-separated list of attributes
49         @param targets space-separated list of targets
50      */

51         public ResultsForGetSet []
52     mbeanGet( String JavaDoc attrs, String JavaDoc [] targets) throws Exception JavaDoc;
53     
54
55     /*
56         Supports the set CLI command
57         
58         @param attrs comma-separated list of attributes/value pairs
59         @param targets space-separated list of targets
60      */

61         public ResultsForGetSet []
62     mbeanSet( String JavaDoc attrs, String JavaDoc [] targets ) throws Exception JavaDoc;
63
64      
65     /*
66         Supports the invoke CLI command
67         
68         @param operationName name of operation to invoke
69         @param argList comma-separated list of operation arguments
70         @param namedInvocation true if the arguments are named, false otherwise
71         @param targets space-separated list of targets
72         
73         @returns array of InvokeResult[], one for each resolved target
74      */

75         public InvokeResult []
76     mbeanInvoke( String JavaDoc operationName, String JavaDoc args, String JavaDoc [] targets ) throws Exception JavaDoc;
77     
78     
79     
80     /*
81         Supports the find CLI command
82         
83         @param patterns space-separated list of ObjectName patterns
84         @returns array of ObjectName which match the pattern(s)
85      */

86         public ObjectName []
87     mbeanFind( String JavaDoc [] patterns )
88         throws Exception JavaDoc;
89         
90     /*
91         Supports the find CLI command with regular expressions
92         
93         @param patterns space-separated list of ObjectName patterns
94         @param regexList comma-separate list of name/value regular expressions (eg nameexp=valueexp)
95         @returns array of ObjectName which match the pattern(s)
96      */

97         public ObjectName []
98     mbeanFind( String JavaDoc [] patterns, String JavaDoc regexList )
99         throws Exception JavaDoc;
100
101
102     /*
103         Supports the inspect CLI command
104         
105         @param name ObjectName which must resolve to single MBean ObjectName
106      */

107         public InspectResult
108     mbeanInspect( InspectRequest request, ObjectName name ) throws Exception JavaDoc;
109     
110     /*
111         Supports the list CLI command
112         
113         @param patterns space-separated list of ObjectName patterns
114      */

115         public InspectResult []
116     mbeanInspect( InspectRequest request, String JavaDoc [] targets ) throws Exception JavaDoc;
117     
118     
119     /*
120         Supports the create CLI command
121         
122         @param name the ObjectName for the newly created MBean
123         @param theClass the class of the MBean to instantiate
124         @param args optional argument list to choose a constructor
125      */

126         public void
127     mbeanCreate( String JavaDoc name, String JavaDoc theClass, String JavaDoc args ) throws Exception JavaDoc;
128     
129     /*
130         Supports the delete CLI command
131         
132         @param name the ObjectName for the MBean to unregister
133      */

134         public void
135     mbeanUnregister( String JavaDoc name ) throws Exception JavaDoc;
136     
137     /*
138         Supports the count CLI command
139      */

140         public int
141     mbeanCount( ) throws Exception JavaDoc;
142     
143     /*
144         Supports the domains CLI command
145      */

146         public String JavaDoc []
147     mbeanDomains( ) throws Exception JavaDoc;
148     
149     /*
150         Supports the delete CLI command
151         
152         @param name the ObjectName for the MBean to unregister
153      */

154         public void
155     mbeanListen(
156         boolean start,
157         String JavaDoc [] targets,
158         NotificationListener listener,
159         NotificationFilter filter,
160         Object JavaDoc handback ) throws Exception JavaDoc;
161     
162     
163     /*
164         Resolve a set of targets to their underlying ObjectNames. Targets may
165         be fully qualified, partially qualified or aliases. Targets that can't be
166         resolved are ignored.
167         
168         @param targets array of targets to be resolved.
169      */

170         public ObjectName []
171     resolveTargets( final String JavaDoc [] targets) throws Exception JavaDoc;
172 }
173
174
Popular Tags