Examples of HostTargetIdRetriever


Examples of org.eclipse.jetty.rhttp.gateway.HostTargetIdRetriever

    {
        String host = "test";
        Class<HttpServletRequest> klass = HttpServletRequest.class;
        HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, new Request(host));

        HostTargetIdRetriever retriever = new HostTargetIdRetriever(null);
        String result = retriever.retrieveTargetId(request);

        assertEquals(host, result);
    }
View Full Code Here

Examples of org.eclipse.jetty.rhttp.gateway.HostTargetIdRetriever

        String suffix = ".rhttp.example.com";
        String host = "test";
        Class<HttpServletRequest> klass = HttpServletRequest.class;
        HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, new Request(host + suffix));

        HostTargetIdRetriever retriever = new HostTargetIdRetriever(suffix);
        String result = retriever.retrieveTargetId(request);

        assertEquals(host, result);
    }
View Full Code Here

Examples of org.eclipse.jetty.rhttp.gateway.HostTargetIdRetriever

        String suffix = ".rhttp.example.com";
        String host = "test";
        Class<HttpServletRequest> klass = HttpServletRequest.class;
        HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, new Request(host + suffix + ":8080"));

        HostTargetIdRetriever retriever = new HostTargetIdRetriever(suffix);
        String result = retriever.retrieveTargetId(request);

        assertEquals(host, result);
    }
View Full Code Here

Examples of org.eclipse.jetty.rhttp.gateway.HostTargetIdRetriever

    public void testHostTargetIdRetrieverNullHost()
    {
        Class<HttpServletRequest> klass = HttpServletRequest.class;
        HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, new Request(null));

        HostTargetIdRetriever retriever = new HostTargetIdRetriever(".rhttp.example.com");
        String result = retriever.retrieveTargetId(request);

        assertNull(result);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.