Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ConduitSelector


       
       
    }
   
    protected ConduitSelector getConduitSelector(Endpoint ep) {
        ConduitSelector cs = getConduitSelector();
        if (cs == null) {
            cs = new UpfrontConduitSelector();
        }
        cs.setEndpoint(ep);
        return cs;
    }
View Full Code Here


    private FailoverStrategy failoverStrategy;
   
    @Override
    public void initialize(Client client, Bus bus) {
        ConduitSelector selector = initTargetSelector(client.getConduitSelector().getEndpoint());
        client.setConduitSelector(selector);
    }
View Full Code Here

    public void testRMClientGetConduit() {
        Proxy proxy = new Proxy(rme);
        Bus bus = control.createMock(Bus.class);
        Endpoint endpoint = control.createMock(Endpoint.class);
        Conduit conduit = control.createMock(Conduit.class);
        ConduitSelector cs = control.createMock(ConduitSelector.class);
        EasyMock.expect(cs.selectConduit(EasyMock.isA(Message.class))).andReturn(conduit);
        control.replay();
        Proxy.RMClient client = proxy.new RMClient(bus, endpoint, cs);
        assertSame(conduit, client.getConduit());   
    }
View Full Code Here

public class ColocFeature extends AbstractFeature {

    @Override
    public void initialize(Client client, Bus bus) {
        ConduitSelector selector = new DeferredConduitSelector();
        selector.setEndpoint(client.getEndpoint());
        client.setConduitSelector(selector);
        initializeProvider(client, bus);
    }
View Full Code Here

        final String address = to.getValue();
        LOG.fine("Resending to address: " + address);
       
        final Endpoint reliableEndpoint = manager.getReliableEndpoint(message).getEndpoint();

        ConduitSelector cs = new DeferredConduitSelector() {
            @Override
            public synchronized Conduit selectConduit(Message message) {
                Conduit conduit = null;
                EndpointInfo endpointInfo = reliableEndpoint.getEndpointInfo();
                org.apache.cxf.ws.addressing.EndpointReferenceType original =
                    endpointInfo.getTarget();
                try {
                    if (null != address) {
                        endpointInfo.setAddress(address);
                    }
                    conduit = super.selectConduit(message);
                } finally {
                    endpointInfo.setAddress(original);
                }
                return conduit;
            }
        };
       
        cs.setEndpoint(reliableEndpoint);
        Conduit c = cs.selectConduit(message);  
        // REVISIT
        // use application endpoint message observer instead?
        c.setMessageObserver(new MessageObserver() {
            public void onMessage(Message message) {
                LOG.fine("Ignoring response to resent message.");
View Full Code Here

                   ClientProxy.getClient(greeter).getConduitSelector()
                   instanceof FailoverTargetSelector);
    }
       
    private void verifyStrategy(Object proxy, Class clz) {
        ConduitSelector conduitSelector =
            ClientProxy.getClient(proxy).getConduitSelector();
        if (conduitSelector instanceof FailoverTargetSelector) {
            Object strategy =
                ((FailoverTargetSelector)conduitSelector).getStrategy();
            assertTrue("unexpected strategy", clz.isInstance(strategy));
View Full Code Here

        return null;
    }
   
    protected Client createClient(Bus bus, Endpoint endpoint, Conduit conduit,
                                  final org.apache.cxf.ws.addressing.EndpointReferenceType address) {
        ConduitSelector cs = new DeferredConduitSelector(conduit) {
            @Override
            public synchronized Conduit selectConduit(Message message) {
                Conduit conduit = null;
                EndpointInfo endpointInfo = getEndpoint().getEndpointInfo();
                org.apache.cxf.ws.addressing.EndpointReferenceType original =
View Full Code Here

                   ClientProxy.getClient(g).getConduitSelector()
                   instanceof FailoverTargetSelector);
    }

    protected void verifyStrategy(Object proxy, Class clz, int count) {
        ConduitSelector conduitSelector =
            ClientProxy.getClient(proxy).getConduitSelector();
        if (conduitSelector instanceof FailoverTargetSelector) {
            AbstractStaticFailoverStrategy strategy =
                (AbstractStaticFailoverStrategy)
                    ((FailoverTargetSelector)conduitSelector).getStrategy();
View Full Code Here

        return WebClient.client(client).getBaseURI().toString();
    }
   
       
    protected void verifyStrategy(Object proxy, Class clz) {
        ConduitSelector conduitSelector =
            WebClient.getConfig(proxy).getConduitSelector();
        if (conduitSelector instanceof FailoverTargetSelector) {
            Object strategy =
                ((FailoverTargetSelector)conduitSelector).getStrategy();
            assertTrue("unexpected strategy", clz.isInstance(strategy));
View Full Code Here

        return WebClient.getConfig(client).getConduitSelector()
            .getEndpoint().getEndpointInfo().getAddress();
    }
   
    protected void verifyStrategy(Object proxy, Class<?> clz) {
        ConduitSelector conduitSelector =
            WebClient.getConfig(proxy).getConduitSelector();
        if (conduitSelector instanceof FailoverTargetSelector) {
            Object strategy =
                ((FailoverTargetSelector)conduitSelector).getStrategy();
            assertTrue("unexpected strategy", clz.isInstance(strategy));
View Full Code Here

TOP

Related Classes of org.apache.cxf.endpoint.ConduitSelector

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.