Package org.terrier.rest
Class SingleIndexRestServer
- java.lang.Object
-
- org.terrier.applications.CLITool
-
- org.terrier.applications.CLITool.CLIParsedCLITool
-
- org.terrier.rest.SingleIndexRestServer
-
public class SingleIndexRestServer extends CLITool.CLIParsedCLITool
Loads the default index and exports via a REST service at http://localhost:8080/
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.applications.CLITool
CLITool.CLIParsedCLITool, CLITool.HelpAliasCLITool, CLITool.HelpCLITool
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
-
Fields inherited from class org.terrier.applications.CLITool
PLATFORM_MODULE, POPULAR_COMMANDS
-
-
Constructor Summary
Constructors Constructor Description SingleIndexRestServer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
commandname()
What commandname should this command respond tojava.lang.String
helpsummary()
Returns a short sentence about what this command is forstatic void
main(java.lang.String[] args)
Main method.int
run(org.apache.commons.cli.CommandLine line)
java.lang.String
sourcepackage()
static org.glassfish.grizzly.http.server.HttpServer
startServer(java.lang.String uri)
Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.-
Methods inherited from class org.terrier.applications.CLITool.CLIParsedCLITool
getIndexRef, getOptions, help, run
-
Methods inherited from class org.terrier.applications.CLITool
commandaliases, run, run, setConfiguration
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
commandname
public java.lang.String commandname()
Description copied from class:CLITool
What commandname should this command respond to- Overrides:
commandname
in classCLITool
-
sourcepackage
public java.lang.String sourcepackage()
- Overrides:
sourcepackage
in classCLITool
-
helpsummary
public java.lang.String helpsummary()
Description copied from class:CLITool
Returns a short sentence about what this command is for- Overrides:
helpsummary
in classCLITool
-
run
public int run(org.apache.commons.cli.CommandLine line) throws java.lang.Exception
- Specified by:
run
in classCLITool.CLIParsedCLITool
- Throws:
java.lang.Exception
-
startServer
public static org.glassfish.grizzly.http.server.HttpServer startServer(java.lang.String uri)
Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.- Returns:
- Grizzly HTTP server.
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Main method.- Parameters:
args
-- Throws:
java.io.IOException
java.lang.Exception
-
-