Package org.mapfish.print.processor.http.matcher

Examples of org.mapfish.print.processor.http.matcher.DnsHostMatcher


    @Test
    public void testExecuteProxyNoMatcher() throws Exception {
        final HttpProxy httpProxy = new HttpProxy();
        httpProxy.setHost(LOCALHOST);
        httpProxy.setPort(PROXY_PORT);
        final DnsHostMatcher dnsHostMatcher = new DnsHostMatcher();
        dnsHostMatcher.setHost("google.com");
        httpProxy.setMatchers(Lists.newArrayList(dnsHostMatcher));
        final String message = "Target was reached without proxy";

        final String path = "/nomatch";
        targetServer.createContext(path, new HttpHandler() {
View Full Code Here


    public void testToCredentials() throws Exception {
        final HttpCredential credential = new HttpCredential();
        credential.setUsername(USERNAME);
        credential.setPassword(PASSWORD);

        final DnsHostMatcher matcher = new DnsHostMatcher();
        matcher.setHost(HttpProxyTest.LOCALHOST);
        credential.setMatchers(Collections.singletonList(matcher));

        AuthScope authscope = AuthScope.ANY;
        final Credentials object = credential.toCredentials(authscope);
        assertNotNull(object);
View Full Code Here

        final HttpCredential credential = new HttpCredential();
        credential.setUsername(USERNAME);
        credential.setPassword(PASSWORD);

        final DnsHostMatcher matcher = new DnsHostMatcher();
        matcher.setHost(HttpProxyTest.LOCALHOST);
        credential.setMatchers(Collections.singletonList(matcher));

        final String target = "https://" + HttpProxyTest.LOCALHOST + ":" + HTTPS_PROXY_PORT;
        HttpProxyTest.assertCorrectResponse(this.configurationFactory, this.requestFactory, credential, message, target, path);
    }
View Full Code Here

TOP

Related Classes of org.mapfish.print.processor.http.matcher.DnsHostMatcher

Copyright © 2018 www.massapicom. 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.