public class SamzaRestService
extends java.lang.Object
addServlet(javax.servlet.Servlet, String),
start() and stop() methods.| Constructor and Description |
|---|
SamzaRestService(org.eclipse.jetty.server.Server server,
org.apache.samza.metrics.ReadableMetricsRegistry metricsRegistry,
java.util.Map<java.lang.String,org.apache.samza.metrics.MetricsReporter> metricsReporters,
org.eclipse.jetty.servlet.ServletContextHandler context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServlet(javax.servlet.Servlet servlet,
java.lang.String path)
Adds the specified
Servlet to the server at the specified path. |
static void |
main(java.lang.String[] args)
Command line interface to run the server.
|
void |
start()
Starts the server asynchronously.
|
void |
stop()
Stops the server.
|
public SamzaRestService(org.eclipse.jetty.server.Server server,
org.apache.samza.metrics.ReadableMetricsRegistry metricsRegistry,
java.util.Map<java.lang.String,org.apache.samza.metrics.MetricsReporter> metricsReporters,
org.eclipse.jetty.servlet.ServletContextHandler context)
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - arguments supported by CommandLine.
In particular, --config-path and --config-factory are used to read the Samza REST config file.java.lang.Exception - if the server could not be successfully started.public void addServlet(javax.servlet.Servlet servlet,
java.lang.String path)
Servlet to the server at the specified path.servlet - the Servlet to be added.path - the path for the servlet.public void start()
throws java.lang.Exception
stop().java.lang.Exception - if the server could not be successfully started.public void stop()
throws java.lang.Exception
java.lang.Exception - if the server could not be successfully stopped.