avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Map and Array Dependencies
Date Tue, 01 Oct 2002 09:58:08 GMT
On Tue, 1 Oct 2002 19:42, Leo Simons wrote:
> On Tue, 2002-10-01 at 11:27, Peter Donald wrote:
> > On Tue, 1 Oct 2002 19:10, Leo Simons wrote:
> > > > Any other comments?
> > >
> > > This adds additional semantic meaning to the lookup key, modifying the
> > > sm contract.
> >
> > nope. See other mail - it adds meaning to the type not the lookup key.
>
> oh. I should shut up then =)
>
> I don't think I get it though. If you now do:
>
> 	sm.lookup( MyService.ROLE + "#" );
>
> phoenix behaves differently from before, right? 

nope.

> So the contract relating
> to the lookup() method changes. I'm probably being silly here....

In phoenix the lookup key is decoupled from the type of the service and it has 
been for a while. So you could quite easily have

MyService[] services =
  (MyService[])sm.lookup( "Theres a hole in my bucket, dear Eliza" );

and that would be perfectly valid. The role name defaults to the name of the 
type unless otherwise specified. 

However if you specified a type that had a postfix of "#" then it will behave 
different. Previously the type just indicated the name of java interface that 
implements service. That has been expanded so that we can have array types. 
We have also added a custom interpretation of "#" because java does not 
natively support a map type.

-- 
Cheers,

Peter Donald
-----------------------------------------------
   "You can't depend on your eyes when your 
   imagination is out of focus." -Mark Twain 
----------------------------------------------- 


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


Mime
View raw message