commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: [VFS] questions and suggestions
Date Wed, 11 May 2005 18:26:43 GMT
Philippe Poulard wrote:
> as each service depends on a single provider, a simple name (as a 
> String) would be sufficient :
> FileObject.getServices().findService("commit");
> but to be more portable, just consider the argument as any Object 
> (XML:DB retrieves a service with a couple of Strings : name, version)
> the file object just has to get a Map and lookup for the service with 
> this key
I dont like it to have to pass strings around.
The CommitService was just meant to be a interface - a CVSFileProvider 
would return a concret implementation like CVSCommitService.

That way if one compiles a program one can be sure that the syntax is 
correct e.g findService("comit") is a painful mistake.

And having a Class[] findServices() would make it easy to write 
interactive programs where one can use reflection to examine the 
possible setup of such a service.

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message