CommonsHttpSolrServer does not conform to bean conventions
----------------------------------------------------------

                 Key: SOLR-1464
                 URL: https://issues.apache.org/jira/browse/SOLR-1464
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 1.3
            Reporter: Sean Fitzgerald
         Attachments: CommonsHttpSolrServer.java-BEAN.patch

Several class variables (baseURL, allowCompression, maxRetries, etc) have 
neither getters nor setters. By creating getters and setters for these 
properties, we can allow other developers to extend CommonsHttpSolrServer with 
additional functionality. It is also then necessary to use these methods 
internally, as opposed to referencing the class variables directly.



For example, by extending a method like 
public String getBaseURL()
One could attach a host monitoring or home-brewed DNS resolution service to 
intercept, thus replicating the functionality of LBHttpSolrServer with very 
little of the code.

Attached is a basic patch (generated using eclipse Source tools), as a minimal 
set of changes. I have not changes the general coding style of the file, though 
that would be preferable. I am open to suggestion on whether these methods 
should be public (as in the attached patch), or protected.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to