public class SamzaRestService
extends java.lang.Object
addServlet(javax.servlet.Servlet, String)
,
start()
and stop()
methods.Constructor and Description |
---|
SamzaRestService(SamzaRestConfig config) |
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(SamzaRestConfig config)
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.