Class MockProxyEngine

  • All Implemented Interfaces:
    ProxyEngine

    public class MockProxyEngine
    extends java.lang.Object
    implements ProxyEngine
    Mock implementation for ProxyEngine
    • Constructor Summary

      Constructors 
      Constructor Description
      MockProxyEngine()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String extractNamespace​(javax.servlet.http.HttpServletRequest request)
      Extracts the namespace coming from client.
      void proxy​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String namespace, java.lang.String url, boolean forceGetMethod, java.util.Map<java.lang.String,​java.lang.String> headers)
      Proxies content
      • Methods inherited from class java.lang.Object

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

      • MockProxyEngine

        public MockProxyEngine()
    • Method Detail

      • proxy

        public void proxy​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          java.lang.String namespace,
                          java.lang.String url,
                          boolean forceGetMethod,
                          java.util.Map<java.lang.String,​java.lang.String> headers)
                   throws ProxyException
        Description copied from interface: ProxyEngine
        Proxies content
        Specified by:
        proxy in interface ProxyEngine
        Parameters:
        request - The HttpServletRequest associated to the call
        response - The HttpServletResponse associated to the call
        namespace - Used for HTML element's id generation
        url - The url to be called
        forceGetMethod - Useful when proxying content, when false it uses the same method used in the original request.
        headers - Extra headers to be passed to the connection, useful for authentication headers.
        Throws:
        ProxyException
      • extractNamespace

        public java.lang.String extractNamespace​(javax.servlet.http.HttpServletRequest request)
        Description copied from interface: ProxyEngine
        Extracts the namespace coming from client.
        Specified by:
        extractNamespace in interface ProxyEngine