Package nzilbb.webapp

Class StandAloneWebApp

    • Constructor Detail

      • StandAloneWebApp

        public StandAloneWebApp()
    • Method Detail

      • main

        public static void main​(String[] argv)
        Command-line entrypoint
      • getRoot

        public File getRoot()
        Getter for root: Root directory of webapp.
        Returns:
        Root directory of webapp.
      • getPort

        public Integer getPort()
        Getter for port: Server port to listen on.
        Returns:
        Server port to listen on.
      • setPort

        @Switch("Server port to listen on (default is 9000)")
        public StandAloneWebApp setPort​(Integer newPort)
        Setter for port: Server port to listen on.
        Parameters:
        newPort - Server port to listen on.
      • getQuery

        public String getQuery()
        Getter for query: The query string to use when opening the web-app.
        Returns:
        The query string to use when opening the web-app.
      • setQuery

        public StandAloneWebApp setQuery​(String newQuery)
        Setter for query: The query string to use when opening the web-app.
        Parameters:
        newQuery - The query string to use when opening the web-app.
      • getFinishedPath

        public String getFinishedPath()
        Getter for finishedPath: The URI path (excluding leading '/') for the request that terminates the web app. Default is "finished".
        Returns:
        The URI path (excluding leading '/') for the request that terminates the web app. Default is "finished".
      • setFinishedPath

        @Switch("The URI pathfor the request that terminates the web app. Default is \'finished\'")
        public StandAloneWebApp setFinishedPath​(String newFinishedPath)
        Setter for finishedPath: The URI path (excluding leading '/') for the request that terminates the web app. Default is "finished".
        Parameters:
        newFinishedPath - The URI path (excluding leading '/') for the request that terminates the web app. Default is "finished".
      • getFinishedResponse

        public String getFinishedResponse()
        Getter for finishedResponse: The HTML document to show when /finishedPath is called.
        Returns:
        The HTML document to show when /finishedPath is called.
      • setFinishedResponse

        @Switch("The HTML document to show when /finishedPath is called")
        public StandAloneWebApp setFinishedResponse​(String newFinishedResponse)
        Setter for finishedResponse: The HTML document to show when /finishedPath is called.
        Parameters:
        newFinishedResponse - The HTML document to show when /finishedPath is called.
      • ContentTypeForName

        public static String ContentTypeForName​(String name)
        Determines the content-type for a given resource name, using the file extension.
        Parameters:
        name -
        Returns:
        A valid content-type
      • start

        public void start()
        Start handling requests