donaldp     2002/10/01 16:50:15

  Modified:    info/src/java/org/apache/avalon/framework/info
                        ServiceInfo.java
  Log:
  Expose methods via serviceInfo
  
  Revision  Changes    Path
  1.2       +32 -2     
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ServiceInfo.java
  
  Index: ServiceInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ServiceInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceInfo.java  13 Sep 2002 15:42:12 -0000      1.1
  +++ ServiceInfo.java  1 Oct 2002 23:50:15 -0000       1.2
  @@ -24,18 +24,35 @@
   public class ServiceInfo
       implements Serializable
   {
  +    /**
  +     * The service described by this info instance.
  +     */
       private final ServiceDescriptor m_service;
   
       /**
  +     * The descriptors for methods in the service interface.
  +     * Note that it is not necessary that all the methods in
  +     * the service interface contain descriptors.
  +     */
  +    private final MethodDescriptor[] m_methods;
  +
  +    /**
        * Basic constructor that takes as parameters all parts.
        */
  -    public ServiceInfo( final ServiceDescriptor service )
  +    public ServiceInfo( final ServiceDescriptor service,
  +                        final MethodDescriptor[] methods )
       {
           if( null == service )
           {
               throw new NullPointerException( "service" );
           }
  +        if( null == methods )
  +        {
  +            throw new NullPointerException( "methods" );
  +        }
  +
           m_service = service;
  +        m_methods = methods;
       }
   
       /**
  @@ -46,5 +63,18 @@
       public ServiceDescriptor getServiceDescriptor()
       {
           return m_service;
  +    }
  +
  +    /**
  +     * Return the methods in the service interface.
  +     * Note that these methods may not be the full set of
  +     * methods in the service interface. The user may only
  +     * declare methods that require extra metadata.
  +     *
  +     * @return the methods in the service interface.
  +     */
  +    public MethodDescriptor[] getMethods()
  +    {
  +        return m_methods;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to