Class GrizzlyRestServicePublishService.HtmlHandler

  • Enclosing class:
    GrizzlyRestServicePublishService

    public static class GrizzlyRestServicePublishService.HtmlHandler
    extends org.glassfish.grizzly.http.server.HttpHandler
    Allow responding with different htmls based on virtual host name.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​java.lang.String> mapping
      The html responses (host->response).
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlHandler()
      Create an html handler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMapping​(java.lang.String host, java.lang.String html)
      Add a mapping.
      void service​(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response resp)
      Service the request.
      • Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler

        destroy, getErrorPageGenerator, getName, getRequestExecutorProvider, getRequestURIEncoding, getSessionCookieName, getSessionManager, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updatePaths
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mapping

        protected java.util.Map<java.lang.String,​java.lang.String> mapping
        The html responses (host->response).
    • Constructor Detail

      • HtmlHandler

        public HtmlHandler()
        Create an html handler.
    • Method Detail

      • addMapping

        public void addMapping​(java.lang.String host,
                               java.lang.String html)
        Add a mapping.
      • service

        public void service​(org.glassfish.grizzly.http.server.Request request,
                            org.glassfish.grizzly.http.server.Response resp)
        Service the request.
        Specified by:
        service in class org.glassfish.grizzly.http.server.HttpHandler