Class GrizzlyRestServicePublishService

    • Constructor Detail

      • GrizzlyRestServicePublishService

        public GrizzlyRestServicePublishService()
        Create a new publish service.
      • GrizzlyRestServicePublishService

        public GrizzlyRestServicePublishService​(IRestMethodGenerator generator)
        Create a new publish service.
    • Method Detail

      • mirrorHttpServer

        public IFuture<java.lang.Void> mirrorHttpServer​(java.net.URI sourceserveruri,
                                                        java.net.URI targetserveruri,
                                                        PublishInfo info)
        Mirror an existing http server.
        Parameters:
        sourceserveruri - The URI of the server being mirrored.
        targetserveruri - The URI of the mirror server.
        info - Publish infos for the mirror server.
      • shutdownHttpServer

        public IFuture<java.lang.Void> shutdownHttpServer​(java.net.URI uri)
        Explicitely terminated an existing http server.
        Parameters:
        uri - URI of the server.
      • publishRedirect

        public IFuture<java.lang.Void> publishRedirect​(java.net.URI uri,
                                                       java.lang.String html)
        Publish permanent redirect.
      • unpublish

        public IFuture<java.lang.Void> unpublish​(java.lang.String vhost,
                                                 java.net.URI uri)
        Unpublish an already-published handler.
        Parameters:
        vhost - The virtual host, if any, null for general.
        uti - The uri being unpublished.
      • startServer

        protected org.glassfish.grizzly.http.server.HttpServer startServer​(java.net.URI uri,
                                                                           PublishInfo info,
                                                                           java.lang.String errorpagefallback)
                                                                    throws java.lang.Exception
        Starts a server.
        Parameters:
        uri - The server URI.
        info - Publish infos.
        errorpagefallback - Error page URL fallback if not provided in publish infos.
        Returns:
        The server.
        Throws:
        java.lang.Exception