ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurdoch...@yahoo.com>
Subject RE: [myrmidon] add TaskContext.getService()
Date Fri, 25 Jan 2002 03:41:52 GMT

Hi,

Using a Class sounds like a good plan.  I've redone my patch (attached) to use a Class object,
and merged in your changes from yesterday.  You can ignore the last patch.


Adam

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Thursday, 24 January 2002 10:09 PM
> To: Ant Developers List
> Subject: Re: [myrmidon] add TaskContext.getService()
> 
> 
> Hi,
> 
> It seems you and I had the same idea. I just half converted 
> TaskContext to 
> using a getService() method rather than a CM too ;)
> 
> The only difference is that the way I did it you passed in a Class object 
> rather than a string. I wouldn't mind trying this approach first 
> rather than 
> passing in a string. The main reason Avalon passed in strings was 
> due to icky 
> ClassLoader semantics that could occur in some situations and to allow 
> multiple implementations of a service be retrieved. Neither of these 
> requirements are present in Ant (I don't think) so I would like to try 
> passing in a CLass for the moment. Ok?
> 
> Other than that I will commit the rest when I next play (prolly 
> st or sunday 
> afternoon).
> 
> On Thu, 24 Jan 2002 22:23, Adam Murdoch wrote:
> > Hi,
> >
> > This patch adds a getService() method to TaskContext.  This 
> method replaces
> > Composable, as far as tasks are concerned.  The motivation was 
> to provide a
> > place where tasks can get at services, and in particular, a
> > FileSystemManager.
> >
> > TaskContext.getService() returns an Object.  Do we need to add a Service
> > interface (which we can later add a ROLE attribute to), or is Object
> > sufficient?
> >
> > The change details:
> >
> > * Changed all tasks that used to implement Composable, to use
> > TaskContext.getService() instead.
> >
> > * Axed ExecutionFrame.getComponentManager().  DefaultExecutor no longer
> > composes tasks.
> >
> > * DefaultTaskContext uses a ComponentManager to locate services. 
> > Currently, this is the same ComponentManager that used to be used to
> > compose the tasks.
> >
> > * Fixed Condition.evaluate() to work if the property is not defined.  It
> > should now only throw an exception when the condition is badly-formed.
> > Changed its signature to throw a TaskException, rather than a
> > ContextException.
> >
> > * Changed LoadProperties to extend AbstractTask instead of
> > AbstractContainerTask.
> >
> >
> > Adam
> 
> -- 
> Cheers,
> 
> Pete
> 
> -------------------------------------------------
> We should take care not to make the intellect our 
> god; it has, of course, powerful muscles, but no 
> personality.
> -------------------------------------------------
> 
> --
> 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