Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.Conduit


                    exchange.setInMessage(m);
                    m.setExchange(exchange);
                    verifyReceivedMessage(m);
                    verifyHeaders(m, outMessage);
                    // setup the message for
                    Conduit backConduit;
                    try {
                        backConduit = destination.getBackChannel(m, null, null);
                        // wait for the message to be got from the conduit
                        Message replyMessage = new MessageImpl();
                        sendoutMessage(backConduit, replyMessage, true);
View Full Code Here


           
            addInterceptors(effectivePolicy.getInterceptors(), msg);
            assertions.addAll(effectivePolicy.getChosenAlternative());
        } else if (MessageUtils.isRequestor(msg)) {
            // 2. Process client policy
            Conduit conduit = exchange.getConduit(msg);
           
            // add the required interceptors
            EffectivePolicy effectivePolicy = pe.getEffectiveClientRequestPolicy(ei, boi, conduit);
            msg.put(EffectivePolicy.class, effectivePolicy);
            if (effectivePolicy != null) {
View Full Code Here

    public void testGetConduit() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setAddress("http://bar");
        bean.setResourceClass(BookStore.class);
        BookStore store = bean.create(BookStore.class);
        Conduit conduit = WebClient.getConfig(store).getConduit();
        assertTrue(conduit instanceof HTTPConduit);
    }
View Full Code Here

           
            try {
                if (reference == null) {
                    reference = ContextUtils.getNoneEndpointReference();
                }
                Conduit backChannel = target.getBackChannel(inMessage,
                                                            partialResponse,
                                                            reference);
                Exception exception = inMessage.getContent(Exception.class);
                //Add this to handle two way faultTo
                //TODO:Look at how to refactor
View Full Code Here

            inMessage.getExchange().setOneWay(true);
            ConduitInitiator conduitInitiator
                = bus.getExtension(ConduitInitiatorManager.class)
                    .getConduitInitiatorForUri(reference.getAddress().getValue());
            if (conduitInitiator != null) {
                Conduit c = conduitInitiator.getConduit(ei, reference);
                // ensure decoupled back channel input stream is closed
                c.setMessageObserver(new MessageObserver() {
                    public void onMessage(Message m) {
                        InputStream is = m.getContent(InputStream.class);
                        if (is != null) {
                            try {
                                is.close();
View Full Code Here

            .anyTimes();
        RMEndpoint rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(manager.createReliableEndpoint(endpoint))
            .andReturn(rme);
        EasyMock.expect(exchange.getDestination()).andReturn(null);
        Conduit conduit = control.createMock(Conduit.class);
        EasyMock.expect(exchange.getConduit(message)).andReturn(conduit);
        rme.initialise(conduit, null, null);
        EasyMock.expectLastCall();

        control.replay();
View Full Code Here

        Exchange exchange = control.createMock(Exchange.class);
        EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
        EasyMock.expect(exchange.getOutMessage()).andReturn(message).anyTimes();
        EasyMock.expect(exchange.getInMessage()).andReturn(null).anyTimes();
        EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes();
        Conduit conduit = control.createMock(Conduit.class);
        EasyMock.expect(exchange.getConduit(message)).andReturn(conduit).anyTimes();
        Identifier inSid = control.createMock(Identifier.class);       
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
View Full Code Here

   
    @Test
    public void testRecoverReliableEndpoint() {
        manager = new RMManager();
        Endpoint endpoint = control.createMock(Endpoint.class);
        Conduit conduit = control.createMock(Conduit.class);
               
        control.replay();
        manager.recoverReliableEndpoint(endpoint, conduit);
        control.verify();
       
View Full Code Here

        EndpointInfo ei = control.createMock(EndpointInfo.class);
        ServiceInfo si = control.createMock(ServiceInfo.class)
        BindingInfo bi = control.createMock(BindingInfo.class);
        InterfaceInfo ii = control.createMock(InterfaceInfo.class);
        setUpEndpointForRecovery(endpoint, ei, si, bi, ii);         
        Conduit conduit = control.createMock(Conduit.class);       
        setUpRecoverReliableEndpoint(endpoint, conduit, null, null, null, null);
        control.replay();
        manager.recoverReliableEndpoint(endpoint, conduit);
        control.verify();
       
View Full Code Here

    protected boolean isSequenceSuspended(String key) {
        return suspendedCandidates.containsKey(key);
    }

    private void clientResend(Message message) {
        Conduit c = message.getExchange().getConduit(message);
        resend(c, message);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.Conduit

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.