001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2005 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: ManagementEndpoint.java 9680 2006-10-06 12:08:33Z danesa $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.mejb;
025:
026: import java.rmi.Remote;
027: import java.rmi.RemoteException;
028:
029: /**
030: * This is the interface for a monitoring webservice used to remotely
031: * monitor mbeans in the domain.
032: * @author Matt Wringe
033: * @author Vivek Lakshmanan
034: */
035: public interface ManagementEndpoint extends Remote {
036:
037: /**
038: * Returns the name of the current domain.
039: * @return The name of the domain.
040: * @throws RemoteException If an error occurs communicating with the server.
041: */
042: String getDefaultDomain() throws RemoteException;
043:
044: /**
045: * Returns the server names in the domain.
046: * @return The servers in the domain.
047: * @throws RemoteException If an error occurs with the web service.
048: * @throws ManagementEndpointException If any error occurs with getServers.
049: */
050: String[] getServers() throws ManagementEndpointException,
051: RemoteException;
052:
053: /**
054: * Returns the attribute value for an mbean on a server in the domain.
055: * @param domainServerName The name of the server in the domain.
056: * @param objectName The objectname of the mbean.
057: * @param attribute The attribute to be returned.
058: * @return The value of the attribute.
059: * @throws ManagementEndpointException If any error occurs with getAttribute.
060: * @throws RemoteException If an error occurs with the web service.
061: */
062: String[] getAttribute(String domainServerName, String objectName,
063: String attribute) throws ManagementEndpointException,
064: RemoteException;
065:
066: /**
067: * Returns the number of mbeans for a server in the domain.
068: * @param domainServerName The name of the server in the domain.
069: * @return The number of mbeans for the specified server.
070: * @throws RemoteException If an error occurs communicating with the server.
071: */
072: Integer getMBeanCount(String domainServerName)
073: throws RemoteException;
074:
075: /**
076: * Returns True if the mbean is registered with the server in the domain,
077: * false otherwise.
078: * @param domainServerName The name of the server in the domain.
079: * @param objectName The objectname of the mbean.
080: * @return True if the mbean is registered, false if not.
081: * @throws ManagementEndpointException If any error occurs with isRegistered.
082: * @throws RemoteException If an error occurs with the web service.
083: */
084: boolean isRegistered(String domainServerName, String objectName)
085: throws ManagementEndpointException, RemoteException;
086:
087: /**
088: * Returns the search results for mbeans on a server in the domain. The query
089: * parameter currently does nothing.
090: * @param domainServerName The name of the server in the domain.
091: * @param objectName The objectname of the mbean.
092: * @param query Currently does nothing.
093: * @return The ObjectNames for the queried mbeans.
094: * @throws ManagementEndpointException If any error occurs with queryNames.
095: * @throws RemoteException If an error occurs with the web service.
096: */
097: String[] queryNames(String domainServerName, String objectName,
098: String query) throws ManagementEndpointException,
099: RemoteException;
100:
101: /**
102: * Returns a list of attributes for a specified mbean on a server in the
103: * domain.
104: * @param domainServerName The name of the server in the domain.
105: * @param objectName The objectname of the mbean.
106: * @return The list of attributes for the mbean.
107: * @throws ManagementEndpointException If any error occurs with getAttributesList.
108: * @throws RemoteException If an error occurs with the web service.
109: */
110: String[] getAttributesList(String domainServerName,
111: String objectName) throws ManagementEndpointException,
112: RemoteException;
113:
114: /**
115: * Returns the description for an mbean on a server in the domain.
116: * @param domainServerName The name of the server in the domain.
117: * @param objectName The objectname of the mbean.
118: * @return The description for the mbean.
119: * @throws ManagementEndpointException If any error occurs with getDescription.
120: * @throws RemoteException If an error occurs with the web service.
121: */
122: String getDescription(String domainServerName, String objectName)
123: throws ManagementEndpointException, RemoteException;
124:
125: /**
126: * Returns the list of operations for an mbean on a server in the domain.
127: * @param domainServerName The name of the server in the domain.
128: * @param objectName The objectname of the mbean.
129: * @return The operations for the mbean.
130: * @throws ManagementEndpointException If any error occurs with getOperations.
131: * @throws RemoteException If an error occurs with the web service.
132: */
133: String[] getOperations(String domainServerName, String objectName)
134: throws ManagementEndpointException, RemoteException;
135:
136: /**
137: * Invokes an mbean operation having String params on a server in the domain.
138: * @param domainServerName The name of the server in the domain.
139: * @param objectName The objectname of the mbean.
140: * @param operationName operation name
141: * @param params String parameters
142: * @return The operation result
143: * @throws ManagementEndpointException If any error occurs with getOperations.
144: * @throws RemoteException If an error occurs with the web service.
145: */
146: String[] invoke(String domainServerName, String objectName,
147: String operationName, String[] params)
148: throws ManagementEndpointException, RemoteException;
149:
150: }
|