ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace DefaultTaskContext.java
Date Thu, 24 Jan 2002 11:48:40 GMT
donaldp     02/01/24 03:48:40

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/api
                        TaskContext.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultTaskContext.java
  Log:
  STart to add the ability to retrieve services from the context
  
  Revision  Changes    Path
  1.14      +14 -1     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
  
  Index: TaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TaskContext.java	5 Jan 2002 03:02:11 -0000	1.13
  +++ TaskContext.java	24 Jan 2002 11:48:40 -0000	1.14
  @@ -34,11 +34,24 @@
       String NAME = "myrmidon.task.name";
   
       /**
  -     * Retrieve Name of tasklet.
  +     * Retrieve Name of task.
        *
        * @return the name
        */
       String getName();
  +
  +    /**
  +     * Retrieve a service that is offered by the runtime.
  +     * The actual services registered and in place for the
  +     * task is determined by the container. The returned service
  +     * <b>MUST</b> implement the specified interface.
  +     *
  +     * @param serviceClass the interface class that defines the service
  +     * @return an instance of the service implementing interface specified by parameter
  +     * @exception TaskException is thrown when the service is unavailable or not supported
  +     */
  +    Object getService( Class serviceClass )
  +        throws TaskException;
   
       /**
        * Retrieve base directory.
  
  
  
  1.9       +16 -0     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultTaskContext.java	20 Jan 2002 17:32:58 -0000	1.8
  +++ DefaultTaskContext.java	24 Jan 2002 11:48:40 -0000	1.9
  @@ -92,6 +92,22 @@
       }
   
       /**
  +     * Retrieve a service that is offered by the runtime.
  +     * The actual services registered and in place for the
  +     * task is determined by the container. The returned service
  +     * <b>MUST</b> implement the specified interface.
  +     *
  +     * @param serviceClass the interface class that defines the service
  +     * @return an instance of the service implementing interface specified by parameter
  +     * @exception TaskException is thrown when the service is unavailable or not supported
  +     */
  +    public Object getService( final Class serviceClass )
  +        throws TaskException
  +    {
  +        throw new TaskException( "No services available atm" );
  +    }
  +
  +    /**
        * Resolve filename.
        * This involves resolving it against baseDirectory and
        * removing ../ and ./ references. It also means formatting
  
  
  

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


Mime
View raw message