001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: * Free SoftwareFoundation, Inc.
023: * 59 Temple Place, Suite 330
024: * Boston, MA 02111-1307 USA
025: *
026: * @author Sam
027: */
028:
029: package javax.management.j2ee;
030:
031: import javax.ejb.EJBObject;
032: import javax.management.*;
033: import javax.management.j2ee.statistics.ListenerRegistration;
034: import java.rmi.RemoteException;
035: import java.util.Set;
036:
037: /**
038: * EJB service interface for management.
039: */
040: public interface Management extends EJBObject {
041: /**
042: * Returns the value of the named attribute.
043: */
044: public Object getAttribute(ObjectName name, String attribute)
045: throws MBeanException, AttributeNotFoundException,
046: InstanceNotFoundException, ReflectionException,
047: RemoteException;
048:
049: /**
050: * Returns the values of the named attributes.
051: */
052: public AttributeList getAttributes(ObjectName name,
053: String[] attributes) throws InstanceNotFoundException,
054: ReflectionException, RemoteException;
055:
056: /**
057: * Returns the value of the default domain.
058: */
059: public String getDefaultDomain() throws RemoteException;
060:
061: /**
062: * Returns the total number of management beans.
063: */
064: public Integer getMBeanCount() throws RemoteException;
065:
066: /**
067: * Returns the {@link MBeanInfo} for a management beans.
068: */
069: public MBeanInfo getMBeanInfo(ObjectName objectName)
070: throws IntrospectionException, InstanceNotFoundException,
071: ReflectionException, RemoteException;
072:
073: /**
074: * Invokes an operation on a management bean and returns the result.
075: */
076: public Object invoke(ObjectName objectName, String operationName,
077: Object[] parameters, String[] signature)
078: throws MBeanException, InstanceNotFoundException,
079: ReflectionException, RemoteException;
080:
081: /**
082: * Returns true if the management bean with the specified name is registered.
083: */
084: public boolean isRegistered(ObjectName objectName)
085: throws RemoteException;
086:
087: /**
088: * Returns a Set of {@link ObjectName} that match the query.
089: */
090: public Set queryNames(ObjectName objectName, QueryExp queryExp)
091: throws RemoteException;
092:
093: public void setAttribute(ObjectName objectName, Attribute attribute)
094: throws InstanceNotFoundException,
095: AttributeNotFoundException, InvalidAttributeValueException,
096: MBeanException, ReflectionException, RemoteException;
097:
098: /**
099: * Sets the values of the specified attributes.
100: */
101: public AttributeList setAttributes(ObjectName objectName,
102: AttributeList attributes) throws InstanceNotFoundException,
103: ReflectionException, RemoteException;
104:
105: /**
106: * Returns the listener registry. The listener registry is used
107: * to register a listener that receives notifications.
108: */
109: public ListenerRegistration getListenerRegistry()
110: throws RemoteException;
111:
112: }
|