nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki ...@getopt.org>
Subject Re: [Nutch-cvs] svn commit: r414681 - /lucene/nutch/trunk/src/java/org/apache/nutch/protocol/ProtocolFactory.java
Date Fri, 16 Jun 2006 08:59:19 GMT
siren@apache.org wrote:
> Author: siren
> Date: Thu Jun 15 13:53:14 2006
> New Revision: 414681
>
> URL: http://svn.apache.org/viewvc?rev=414681&view=rev
> Log:
> protocols are now instantiated and configured only once
>
>   
[...]
> +
> +      if (conf.getObject(protocolName) != null) {
> +        return (Protocol) conf.getObject(protocolName);
> +      } else {
> +        Extension extension = findExtension(protocolName);
> +        if (extension == null) {
> +          throw new ProtocolNotFound(protocolName);
> +        }
>   

I'm somewhat worried about the possible clash in the conf name-space -  
usually, when we store Object's in Configuration instance, we use their 
full class name, or at least a long and most probably unique string. In 
this case, we use just "http", "https", "ftp", "file" and so on ... 
Would it make sense if in this special case we used the X_POINT + 
protocolName as the unique string?

Perhaps I'm worrying too much ... ;)

-- 
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com



Mime
View raw message