org.apache.solr.client.solrj.embedded
Class JettySolrRunner

java.lang.Object
  extended by org.apache.solr.client.solrj.embedded.JettySolrRunner

public class JettySolrRunner
extends Object

Run solr using jetty

Since:
solr 1.3
Version:
$Id: JettySolrRunner.java 820101 2009-09-29 21:53:48Z yonik $

Nested Class Summary
static class JettySolrRunner.Servlet404
          This is a stupid hack to give jetty something to attach to
 
Constructor Summary
JettySolrRunner(String context, int port)
           
JettySolrRunner(String context, int port, String solrConfigFilename)
           
 
Method Summary
 int getLocalPort()
          Returns the Local Port of the first Connector found for the jetty Server.
static void main(String[] args)
          A main class that starts jetty+solr This is useful for debugging
 void start()
           
 void start(boolean waitForSolr)
           
 void stop()
           
 void waitForSolr(String context)
          Waits until a ping query to the solr server succeeds, retrying every 200 milliseconds up to 2 minutes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettySolrRunner

public JettySolrRunner(String context,
                       int port)

JettySolrRunner

public JettySolrRunner(String context,
                       int port,
                       String solrConfigFilename)
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

start

public void start(boolean waitForSolr)
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

waitForSolr

public void waitForSolr(String context)
                 throws Exception
Waits until a ping query to the solr server succeeds, retrying every 200 milliseconds up to 2 minutes.

Throws:
Exception

getLocalPort

public int getLocalPort()
Returns the Local Port of the first Connector found for the jetty Server.

Throws:
RuntimeException - if there is no Connector

main

public static void main(String[] args)
A main class that starts jetty+solr This is useful for debugging



Copyright © 2010 Apache Software Foundation. All Rights Reserved.