Package org.apache.cxf.transport.http.policy.impl

Examples of org.apache.cxf.transport.http.policy.impl.ServerPolicyCalculator


    }

    private void initConfig() {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        if (pde != null) {
            server = pde.getServerEndpointPolicy(endpointInfo, this, new ServerPolicyCalculator());
        }
        if (null == server && WSDLLibrary.isAvailable()) {
            server = endpointInfo.getTraversedExtensor(
                    new HTTPServerPolicy(), HTTPServerPolicy.class);
        }
View Full Code Here


        this.server = server;
    }
   
    public void assertMessage(Message message) {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }
View Full Code Here

        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }

    public boolean canAssert(QName type) {
        return new ServerPolicyCalculator().getDataClassName().equals(type);
    }
View Full Code Here

    }

    private void initConfig() {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        if (pde != null) {
            server = pde.getServerEndpointPolicy(endpointInfo, this, new ServerPolicyCalculator());
        }
        if (null == server && WSDLLibrary.isAvailable()) {
            server = endpointInfo.getTraversedExtensor(
                    new HTTPServerPolicy(), HTTPServerPolicy.class);
        }
View Full Code Here

        this.server = server;
    }
   
    public void assertMessage(Message message) {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }
View Full Code Here

        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }

    public boolean canAssert(QName type) {
        return new ServerPolicyCalculator().getDataClassName().equals(type);
    }
View Full Code Here

    }

    private void initConfig() {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        if (pde != null) {
            server = pde.getServerEndpointPolicy(endpointInfo, this, new ServerPolicyCalculator());
        }
        if (null == server && WSDLLibrary.isAvailable()) {
            server = endpointInfo.getTraversedExtensor(
                    new HTTPServerPolicy(), HTTPServerPolicy.class);
        }
View Full Code Here

        this.server = server;
    }
   
    public void assertMessage(Message message) {
        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }
View Full Code Here

        PolicyDataEngine pde = bus.getExtension(PolicyDataEngine.class);
        pde.assertMessage(message, server, new ServerPolicyCalculator());
    }

    public boolean canAssert(QName type) {
        return new ServerPolicyCalculator().getDataClassName().equals(type);
    }
View Full Code Here

import org.junit.Test;

public class ServerPolicyCalculatorTest extends Assert {
    @Test
    public void testCompatibleServerPolicies() {
        ServerPolicyCalculator spc = new ServerPolicyCalculator();
        HTTPServerPolicy p1 = new HTTPServerPolicy();
        assertTrue("Policy is not compatible with itself.", spc.compatible(p1, p1));
        HTTPServerPolicy p2 = new HTTPServerPolicy();
        assertTrue("Policies are not compatible.", spc.compatible(p1, p2));
        p1.setServerType("server");
        assertTrue("Policies are not compatible.", spc.compatible(p1, p2));
        p1.setServerType(null);
        p1.setReceiveTimeout(10000);
        assertTrue("Policies are not compatible.", spc.compatible(p1, p2));
        p1.setSuppressClientSendErrors(false);
        assertTrue("Policies are compatible.", spc.compatible(p1, p2));
        p1.setSuppressClientSendErrors(true);
        assertTrue("Policies are compatible.", !spc.compatible(p1, p2));
        p2.setSuppressClientSendErrors(true);
        assertTrue("Policies are compatible.", spc.compatible(p1, p2));
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.http.policy.impl.ServerPolicyCalculator

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.