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 intDEFAULT_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.Stringcommandname()What commandname should this command respond tojava.lang.Stringhelpsummary()Returns a short sentence about what this command is forstatic voidmain(java.lang.String[] args)Main method.intrun(org.apache.commons.cli.CommandLine line)java.lang.Stringsourcepackage()static org.glassfish.grizzly.http.server.HttpServerstartServer(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:CLIToolWhat commandname should this command respond to- Overrides:
commandnamein classCLITool
-
sourcepackage
public java.lang.String sourcepackage()
- Overrides:
sourcepackagein classCLITool
-
helpsummary
public java.lang.String helpsummary()
Description copied from class:CLIToolReturns a short sentence about what this command is for- Overrides:
helpsummaryin classCLITool
-
run
public int run(org.apache.commons.cli.CommandLine line) throws java.lang.Exception- Specified by:
runin 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.ExceptionMain method.- Parameters:
args-- Throws:
java.io.IOExceptionjava.lang.Exception
-
-