Class ZPageHandler


  • public abstract class ZPageHandler
    extends Object
    The main interface for all zPages. All zPages should implement this interface to allow the HTTP server implementation to support these pages.
    • Method Detail

      • getUrlPath

        public abstract String getUrlPath()
        Returns the URL path that should be used to register this zPage to the HTTP server.
        Returns:
        the URL path that should be used to register this zPage to the HTTP server.
      • getPageName

        public abstract String getPageName()
        Returns the name of the zPage.
        Returns:
        the name of the zPage.
      • getPageDescription

        public abstract String getPageDescription()
        Returns the description of the zPage.
        Returns:
        the description of the zPage.
      • processRequest

        public boolean processRequest​(String requestMethod,
                                      Map<String,​String> queryMap,
                                      OutputStream outputStream)
        Process requests that require changes (POST/PUT/DELETE).
        Parameters:
        requestMethod - the request method HttpHandler received.
        queryMap - the map of the URL query parameters.
        Returns:
        true if theres an error while processing the request.
      • emitHtml

        public abstract void emitHtml​(Map<String,​String> queryMap,
                                      OutputStream outputStream)
        Emits the generated HTML page to the outputStream.
        Parameters:
        queryMap - the map of the URL query parameters.
        outputStream - the output for the generated HTML page.