01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)JMXConnection.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.ui.client;
30:
31: import com.sun.jbi.ui.common.JBIRemoteException;
32: import com.sun.jbi.ui.common.JMXConnectionException;
33: import javax.management.Attribute;
34: import javax.management.MBeanServerConnection;
35: import javax.management.ObjectName;
36:
37: /** This interface defines the higher level interface
38: * to access jmx apis from client side.
39: * @author Sun Microsystems, Inc.
40: */
41:
42: public interface JMXConnection {
43: /**
44: * opens the jmx connection
45: * @throws JMXConnectionException on jmx error
46: */
47: public void openConnection() throws JMXConnectionException;
48:
49: /**
50: * closes the jmx connection
51: * @throws JMXConnectionException on jmx error
52: */
53: public void closeConnection() throws JMXConnectionException;
54:
55: /**
56: * gives the MBeanSever connection interface. Should be called after open
57: * @return mbean server connection interface
58: * @throws IllegalStateException on jmx error
59: */
60: public MBeanServerConnection getMBeanServerConnection()
61: throws IllegalStateException;
62:
63: /**
64: * invokes the operation on mbean
65: * @return result object
66: * @param name object name
67: * @param operationName operation name
68: * @param params parameters
69: * @param signature signature of the parameters
70: * @throws JMXConnectionException on jmx error
71: * @throws JBIRemoteException on user error
72: */
73: public Object invokeMBeanOperation(ObjectName name,
74: String operationName, Object[] params, String[] signature)
75: throws JMXConnectionException, JBIRemoteException;
76:
77: /**
78: * retrieves the attribute value
79: * @return result object
80: * @param name object name
81: * @param attribute attribute object
82: * @throws JMXConnectionException on jmx error
83: * @throws JBIRemoteException on user error
84: */
85: public Object getMBeanAttribute(ObjectName name, String attribute)
86: throws JMXConnectionException, JBIRemoteException;
87:
88: /**
89: * sets the attribute value
90: * @param name object name
91: * @param attribute attribute object
92: * @throws JMXConnectionException on jmx error
93: * @throws JBIRemoteException on user error
94: */
95: public void setMBeanAttribute(ObjectName name, Attribute attribute)
96: throws JMXConnectionException, JBIRemoteException;
97:
98: }
|