/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.solr.client.solrj.request;

import java.io.IOException;
import java.util.Collection;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.response.SolrPingResponse;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.ContentStream;

/**
 * 
 *
 * @since solr 1.3
 */
public class SolrPing extends SolrRequest
{
  private ModifiableSolrParams params;
  
  public SolrPing()
  {
    super( METHOD.GET, "/admin/ping" );
    params = new ModifiableSolrParams();
  }

  @Override
  public Collection<ContentStream> getContentStreams() {
    return null;
  }

  @Override
  public ModifiableSolrParams getParams() {
    return params;
  }

  @Override
  public SolrPingResponse process( SolrServer server ) throws SolrServerException, IOException 
  {
    long startTime = System.currentTimeMillis();
    SolrPingResponse res = new SolrPingResponse();
    res.setResponse( server.request( this ) );
    res.setElapsedTime( System.currentTimeMillis()-startTime );
    return res;
  }
}

@@ -854,58 +854,49 @@
 ort 
-java.io.IOException;%0Aimport java.util.Collection;%0A
+org.apache.solr.client.solrj.SolrRequest;
 %0Aimp
@@ -1001,57 +1001,8 @@
 on;%0A
-import org.apache.solr.client.solrj.SolrRequest;%0A
 impo
@@ -1174,15 +1174,278 @@
 m;%0A%0A
-/**%0A * 
+import java.io.IOException;%0Aimport java.util.Collection;%0A%0A/**%0A * Verify that there is a working Solr core at the URL of a %7B@link SolrServer%7D.%0A * To use this class, the solrconfig.xml for the relevant core must include the%0A * request handler for %3Ccode%3E/admin/ping%3C/code%3E.
 %0A *%0A

Improve Javadoc for SolrPing