Class ServletWarClient

  • All Implemented Interfaces:
    org.restlet.Uniform

    public class ServletWarClient
    extends org.restlet.Client
    Connector acting as a WAR client for a Servlet Application. It internally uses one of the available connectors registered with the current Restlet implementation.

    Here is an example of WAR URI that can be resolved by this client: "war:///WEB-INF/web.xml" Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
    Author:
    Jerome Louvel
    • Constructor Summary

      Constructors 
      Constructor Description
      ServletWarClient​(org.restlet.Context parentContext, jakarta.servlet.ServletContext servletContext)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(org.restlet.Request request, org.restlet.Response response)
      Handles a call.
      void start()
      Start callback.
      void stop()
      Stop callback.
      • Methods inherited from class org.restlet.Client

        isAvailable
      • Methods inherited from class org.restlet.Connector

        getProtocols, setProtocols
      • Methods inherited from class org.restlet.Restlet

        createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
    • Constructor Detail

      • ServletWarClient

        public ServletWarClient​(org.restlet.Context parentContext,
                                jakarta.servlet.ServletContext servletContext)
        Constructor.
        Parameters:
        parentContext - The parent context.
    • Method Detail

      • handle

        public void handle​(org.restlet.Request request,
                           org.restlet.Response response)
        Handles a call.
        Specified by:
        handle in interface org.restlet.Uniform
        Overrides:
        handle in class org.restlet.Client
        Parameters:
        request - The request to handle.
        response - The response to update.
      • start

        public void start()
                   throws Exception
        Start callback.
        Overrides:
        start in class org.restlet.Client
        Throws:
        Exception
      • stop

        public void stop()
                  throws Exception
        Stop callback.
        Overrides:
        stop in class org.restlet.Client
        Throws:
        Exception