diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/ResponseParser.java b/client/java/solrj/src/org/apache/solr/client/solrj/ResponseParser.java index 1a99847d4e1..6ae215b62eb 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/ResponseParser.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/ResponseParser.java @@ -19,8 +19,6 @@ package org.apache.solr.client.solrj; import java.io.Reader; import java.io.InputStream; -import java.io.InputStreamReader; - import org.apache.solr.common.util.NamedList; /** diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java b/client/java/solrj/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java index 0e9ffa58dcf..9dff21d7e54 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java @@ -85,6 +85,7 @@ public class EmbeddedSolrServer extends SolrServer return new SolrRequestParsers( true, Long.MAX_VALUE ); } + @Override public NamedList request(SolrRequest request) throws SolrServerException, IOException { String path = request.getPath(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java b/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java index 4b2b1ee2212..8b14538a4f0 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java @@ -19,9 +19,7 @@ package org.apache.solr.client.solrj.impl; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import java.io.OutputStream; -import java.io.Reader; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; @@ -131,6 +129,7 @@ public class CommonsHttpSolrServer extends SolrServer //------------------------------------------------------------------------ //------------------------------------------------------------------------ + @Override public NamedList request( final SolrRequest request ) throws SolrServerException, IOException { // TODO -- need to set the WRITER TYPE!!! diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/impl/XMLResponseParser.java b/client/java/solrj/src/org/apache/solr/client/solrj/impl/XMLResponseParser.java index ff6a36d493f..be0c0b8ff8b 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/impl/XMLResponseParser.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/impl/XMLResponseParser.java @@ -68,11 +68,13 @@ public class XMLResponseParser extends ResponseParser public XMLResponseParser() {} + @Override public String getWriterType() { return "xml"; } + @Override public NamedList processResponse(Reader in) { XMLStreamReader parser = null; try { @@ -84,6 +86,7 @@ public class XMLResponseParser extends ResponseParser return processResponse(parser); } + @Override public NamedList processResponse(InputStream in, String encoding) { XMLStreamReader parser = null; diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/DirectXmlRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/DirectXmlRequest.java index 933d4cb283b..a5d4606e364 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/DirectXmlRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/DirectXmlRequest.java @@ -44,14 +44,17 @@ public class DirectXmlRequest extends SolrRequest xml = body; } + @Override public Collection getContentStreams() { return ClientUtils.toContentStreams( xml, ClientUtils.TEXT_XML ); } + @Override public SolrParams getParams() { return null; } + @Override public UpdateResponse process( SolrServer server ) throws SolrServerException, IOException { long startTime = System.currentTimeMillis(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/LukeRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/LukeRequest.java index 50c0a47ddb1..230c4b939c8 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/LukeRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/LukeRequest.java @@ -74,10 +74,12 @@ public class LukeRequest extends SolrRequest this.showSchema = showSchema; } + @Override public Collection getContentStreams() { return null; } + @Override public SolrParams getParams() { ModifiableSolrParams params = new ModifiableSolrParams(); if( fields != null && fields.size() > 0 ) { @@ -92,6 +94,7 @@ public class LukeRequest extends SolrRequest return params; } + @Override public LukeResponse process( SolrServer server ) throws SolrServerException, IOException { long startTime = System.currentTimeMillis(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/MultiCoreRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/MultiCoreRequest.java index 59997b19617..74621015484 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/MultiCoreRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/MultiCoreRequest.java @@ -80,6 +80,7 @@ public class MultiCoreRequest extends SolrRequest // //--------------------------------------------------------------------------------------- + @Override public SolrParams getParams() { if( action == null ) { @@ -95,10 +96,12 @@ public class MultiCoreRequest extends SolrRequest // //--------------------------------------------------------------------------------------- + @Override public Collection getContentStreams() throws IOException { return null; } + @Override public MultiCoreResponse process(SolrServer server) throws SolrServerException, IOException { long startTime = System.currentTimeMillis(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/QueryRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/QueryRequest.java index 86356395018..9f25d73ba98 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/QueryRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/QueryRequest.java @@ -65,14 +65,17 @@ public class QueryRequest extends SolrRequest //--------------------------------------------------------------------------------- //--------------------------------------------------------------------------------- + @Override public Collection getContentStreams() { return null; } + @Override public SolrParams getParams() { return query; } + @Override public QueryResponse process( SolrServer server ) throws SolrServerException { try diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/SolrPing.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/SolrPing.java index aff782dc280..cfdb9b345e7 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/SolrPing.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/SolrPing.java @@ -42,14 +42,17 @@ public class SolrPing extends SolrRequest params = new ModifiableSolrParams(); } + @Override public Collection getContentStreams() { return null; } + @Override public ModifiableSolrParams getParams() { return params; } + @Override public SolrPingResponse process( SolrServer server ) throws SolrServerException, IOException { long startTime = System.currentTimeMillis(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/UpdateRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/UpdateRequest.java index 4f9370cd36f..a510a3139f8 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/UpdateRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/UpdateRequest.java @@ -131,6 +131,7 @@ public class UpdateRequest extends SolrRequest //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- + @Override public Collection getContentStreams() throws IOException { return ClientUtils.toContentStreams( getXML(), ClientUtils.TEXT_XML ); } @@ -182,6 +183,7 @@ public class UpdateRequest extends SolrRequest //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- + @Override public SolrParams getParams() { if( action != null ) { ModifiableSolrParams params = new ModifiableSolrParams(); @@ -198,6 +200,7 @@ public class UpdateRequest extends SolrRequest return null; } + @Override public UpdateResponse process( SolrServer server ) throws SolrServerException, IOException { long startTime = System.currentTimeMillis(); diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/response/MultiCoreResponse.java b/client/java/solrj/src/org/apache/solr/client/solrj/response/MultiCoreResponse.java index fe15e1e8331..558ad8a8e55 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/response/MultiCoreResponse.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/response/MultiCoreResponse.java @@ -18,8 +18,6 @@ package org.apache.solr.client.solrj.response; import java.util.Date; -import java.util.List; - import org.apache.solr.common.util.NamedList; diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/response/SolrResponseBase.java b/client/java/solrj/src/org/apache/solr/client/solrj/response/SolrResponseBase.java index 851c1609531..0d4dd642c37 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/response/SolrResponseBase.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/response/SolrResponseBase.java @@ -36,6 +36,7 @@ public abstract class SolrResponseBase extends SolrResponse response = res; } + @Override public long getElapsedTime() { return elapsedTime; } @@ -44,6 +45,7 @@ public abstract class SolrResponseBase extends SolrResponse this.elapsedTime = elapsedTime; } + @Override public NamedList getResponse() { return response; }