commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler BaseModelMBean.java
Date Tue, 29 Jan 2002 22:57:26 GMT
remm        02/01/29 14:57:26

  Modified:    modeler/src/java/org/apache/commons/modeler
                        BaseModelMBean.java
  Log:
  - Add accessor for the managed object.
    Patch submitted by Amy Roh.
  
  Revision  Changes    Path
  1.3       +29 -4     jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java
  
  Index: BaseModelMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseModelMBean.java	15 Jan 2002 19:28:46 -0000	1.2
  +++ BaseModelMBean.java	29 Jan 2002 22:57:26 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
1.2 2002/01/15 19:28:46 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/01/15 19:28:46 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
1.3 2002/01/29 22:57:26 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/01/29 22:57:26 $
    *
    * ====================================================================
    *
  @@ -122,7 +122,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2002/01/15 19:28:46 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/29 22:57:26 $
    */
   
   public class BaseModelMBean implements ModelMBean {
  @@ -496,6 +496,31 @@
   
   
       // ----------------------------------------------------- ModelMBean Methods
  +
  +
  +    /**
  +     * Get the instance handle of the object against which we execute
  +     * all methods in this ModelMBean management interface.
  +     *
  +     * @exception InstanceNotFoundException if the managed resource object
  +     *  cannot be found
  +     * @exception MBeanException if the initializer of the object throws
  +     *  an exception
  +     * @exception RuntimeOperationsException if the managed resource or the
  +     *  resource type is <code>null</code> or invalid
  +     */
  +    public Object getManagedResource()
  +        throws InstanceNotFoundException, InvalidTargetObjectTypeException,
  +        MBeanException, RuntimeOperationsException {
  +
  +        if (resource == null)
  +            throw new RuntimeOperationsException
  +                (new IllegalArgumentException("Managed resource is null"),
  +                 "Managed resource is null");
  +
  +        return resource;
  +
  +    }
   
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message