Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.MessageObserver


                                    HttpURLConnection.HTTP_ACCEPTED);
                backChannel = new BackChannelConduit(address, inMessage);
            } else {
                backChannel = conduitInitiator.getConduit(endpointInfo, address);
                // ensure decoupled back channel input stream is closed
                backChannel.setMessageObserver(new MessageObserver() {
                    public void onMessage(Message m) {
                        if (m.getContentFormats().contains(InputStream.class)) {
                            InputStream is = m.getContent(InputStream.class);
                            try {
                                is.close();
View Full Code Here


        endpointInfo = EasyMock.createMock(EndpointInfo.class);
        CorbaConduit corbaConduit = new CorbaConduit(endpointInfo, target, orbConfig);
       
        if (send) {
            // setMessageObserver
            observer = new MessageObserver() {
                public void onMessage(Message m) {                   
                    inMessage = m;
                }
            };
            corbaConduit.setMessageObserver(observer);
View Full Code Here

        IMocksControl control = EasyMock.createNiceControl();
        ServerRequest request = EasyMock.createMock(ServerRequest.class);
        Message msg = EasyMock.createMock(Message.class);            
        String opName = "greetMe";
        EasyMock.expect(request.operation()).andReturn(opName);                       
        MessageObserver incomingObserver = new TestObserver();              
        dsiServant.setObserver(incomingObserver);
       
        control.replay();
        dsiServant.invoke(request);
        control.verify();       
View Full Code Here

        CorbaServerConduit CorbaServerConduit =
            new CorbaServerConduit(endpointInfo, target, orbConfig);
       
        if (send) {
            // setMessageObserver
            observer = new MessageObserver() {
                public void onMessage(Message m) {                   
                    inMessage = m;
                }
            };
            CorbaServerConduit.setMessageObserver(observer);
View Full Code Here

    @Test
    public void testSuspendedException() throws Exception {
        destination = setUpDestination(false, false);
        setUpDoService(false);
        final RuntimeException ex = new RuntimeException();
        observer = new MessageObserver() {
            public void onMessage(Message m) {
                throw new SuspendedInvocationException(ex);
            }
        };
        destination.setMessageObserver(observer);
View Full Code Here

                                                             endpointInfo,
                                                             null,
                                                             engine);
        dest.retrieveEngine();
        policy = dest.getServer();
        observer = new MessageObserver() {
            public void onMessage(Message m) {
                inMessage = m;
                threadDefaultBus = BusFactory.getThreadDefaultBus();
            }
        };
View Full Code Here

    }

    @Override
    public synchronized void addListener(Destination d, Endpoint e) {
        synchronized (d) {
            MessageObserver mo = d.getMessageObserver();
            if (d.getAddress() != null
                && d.getAddress().getAddress() != null
                && d.getAddress().getAddress().getValue() != null
                && d.getAddress().getAddress().getValue().startsWith("soap.udp")) {
                //soap.udp REQUIRES usage of WS-Addressing... we need to turn this on
View Full Code Here

                conduit.getClient().setAllowChunking(true);
                conduit.getClient().setChunkingThreshold(0);
            }
        }

        observer = new MessageObserver() {
            public void onMessage(Message m) {
                inMessage = m;
            }
        };
        conduit.setMessageObserver(observer);
View Full Code Here

                        handleResponseInternal();
                    } catch (Throwable e) {
                        ((PhaseInterceptorChain)outMessage.getInterceptorChain()).abort();
                        outMessage.setContent(Exception.class, e);
                        ((PhaseInterceptorChain)outMessage.getInterceptorChain()).unwind(outMessage);
                        MessageObserver mo = outMessage.getInterceptorChain().getFaultObserver();
                        if (mo == null) {
                            mo = outMessage.getExchange().get(MessageObserver.class);
                        }
                        mo.onMessage(outMessage);
                    }
                }
            };
            HTTPClientPolicy policy = getClient(outMessage);
            boolean exceptionSet = outMessage.getContent(Exception.class) != null;
View Full Code Here

            if (callback == null) {
                chain.setFaultObserver(outFaultObserver);
            } else {
                // We need to wrap the outFaultObserver if the callback is not null
                // calling the conduitSelector.complete to make sure the fail over feature works
                chain.setFaultObserver(new MessageObserver() {
                    public void onMessage(Message message) {
                        Exception ex = message.getContent(Exception.class);
                        if (ex != null) {
                            getConduitSelector().complete(message.getExchange());
                            if (message.getContent(Exception.class) == null) {
View Full Code Here

TOP

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

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.