public class JettySolrRunner extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JettySolrRunner.DebugFilter |
static class |
JettySolrRunner.Servlet404
This is a stupid hack to give jetty something to attach to
|
Constructor and Description |
---|
JettySolrRunner(String solrHome,
JettyConfig config)
Construct a JettySolrRunner
After construction, you must start the jetty with
start() |
JettySolrRunner(String solrHome,
Properties nodeProperties,
JettyConfig config)
Construct a JettySolrRunner
After construction, you must start the jetty with
start() |
JettySolrRunner(String solrHome,
String context,
int port)
Create a new JettySolrRunner.
|
JettySolrRunner(String solrHome,
String context,
int port,
String solrConfigFilename,
String schemaFileName)
Deprecated.
|
JettySolrRunner(String solrHome,
String context,
int port,
String solrConfigFilename,
String schemaFileName,
boolean stopAtShutdown)
Deprecated.
|
JettySolrRunner(String solrHome,
String context,
int port,
String solrConfigFilename,
String schemaFileName,
boolean stopAtShutdown,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets)
Deprecated.
|
JettySolrRunner(String solrHome,
String context,
int port,
String solrConfigFilename,
String schemaFileName,
boolean stopAtShutdown,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SSLConfig sslConfig)
Deprecated.
|
JettySolrRunner(String solrHome,
String context,
int port,
String solrConfigFilename,
String schemaFileName,
boolean stopAtShutdown,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SSLConfig sslConfig,
SortedMap<Class<? extends javax.servlet.Filter>,String> extraRequestFilters)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
URL |
getBaseUrl()
Returns a base URL consisting of the protocal, host, and port for a
Connector in use by the Jetty Server contained in this runner.
|
JettySolrRunner.DebugFilter |
getDebugFilter() |
org.eclipse.jetty.servlet.FilterHolder |
getDispatchFilter() |
int |
getLocalPort()
Returns the Local Port of the jetty Server.
|
String |
getSolrHome() |
boolean |
isRunning() |
boolean |
isStopped() |
static void |
main(String[] args)
A main class that starts jetty+solr This is useful for debugging
|
void |
setCoreNodeName(String coreNodeName)
Deprecated.
set properties in the Properties passed to the constructor
|
void |
setDataDir(String dataDir)
Deprecated.
set properties in the Properties passed to the constructor
|
void |
setProxyPort(int proxyPort)
Sets the port of a local socket proxy that sits infront of this server; if set
then all client traffic will flow through the proxy, giving us the ability to
simulate network partitions very easily.
|
void |
setShards(String shardList)
Deprecated.
set properties in the Properties passed to the constructor
|
void |
setUlogDir(String ulogDir)
Deprecated.
set properties in the Properties passed to the constructor
|
void |
start()
Start the Jetty server
|
void |
stop()
Stop the Jetty server
|
public JettySolrRunner(String solrHome, String context, int port)
start()
solrHome
- the solr home directory to usecontext
- the context to run inport
- the port to run on@Deprecated public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName)
JettySolrRunner(String,Properties,JettyConfig)
@Deprecated public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName, boolean stopAtShutdown)
JettySolrRunner(String,Properties,JettyConfig)
@Deprecated public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName, boolean stopAtShutdown, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets)
JettySolrRunner(String,Properties,JettyConfig)
@Deprecated public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName, boolean stopAtShutdown, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets, SSLConfig sslConfig)
JettySolrRunner(String,Properties,JettyConfig)
@Deprecated public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName, boolean stopAtShutdown, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets, SSLConfig sslConfig, SortedMap<Class<? extends javax.servlet.Filter>,String> extraRequestFilters)
JettySolrRunner(String,Properties,JettyConfig)
public JettySolrRunner(String solrHome, JettyConfig config)
start()
solrHome
- the base path to run fromconfig
- the configurationpublic JettySolrRunner(String solrHome, Properties nodeProperties, JettyConfig config)
start()
solrHome
- the solrHome to usenodeProperties
- the container propertiesconfig
- the configurationpublic org.eclipse.jetty.servlet.FilterHolder getDispatchFilter()
public boolean isRunning()
public boolean isStopped()
public void start() throws Exception
Exception
- if an error occurs on startuppublic void stop() throws Exception
Exception
- if an error occurs on shutdownpublic int getLocalPort()
RuntimeException
- if there is no Connectorpublic void setProxyPort(int proxyPort)
public URL getBaseUrl()
public JettySolrRunner.DebugFilter getDebugFilter()
public static void main(String[] args)
@Deprecated public void setShards(String shardList)
@Deprecated public void setDataDir(String dataDir)
@Deprecated public void setUlogDir(String ulogDir)
@Deprecated public void setCoreNodeName(String coreNodeName)
public String getSolrHome()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.