Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.MessageObserver


                nmr.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, "dumy")));
        exchange.getIn().setSecuritySubject(subject);
        Source source = new StreamSource(new ByteArrayInputStream(
                "<message>TestHelloWorld</message>".getBytes()));
        exchange.getIn().setBody(source);
        observer = new MessageObserver() {
            public void onMessage(Message m) {                   
                inMessage = m;
                Subject receivedSubject =
                  (Subject)inMessage.get(NMRTransportFactory.NMR_SECURITY_SUBJECT);
                assertNotNull(receivedSubject);
View Full Code Here


                    syncInvoke(exchange);
                } catch (Throwable e) {
                    ((PhaseInterceptorChain)message.getInterceptorChain()).abort();
                    message.setContent(Exception.class, e);
                    ((PhaseInterceptorChain)message.getInterceptorChain()).unwind(message);
                    MessageObserver mo = message.getInterceptorChain().getFaultObserver();
                    if (mo == null) {
                        mo = message.getExchange().get(MessageObserver.class);
                    }
                    mo.onMessage(message);
                }
            }
        };

        try {
View Full Code Here

       
        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

        bodyParts.add(mpi);
    }

    @Override
    public synchronized void addListener(Destination d, Endpoint e) {
        MessageObserver mo = d.getMessageObserver();
        if (mo == null) {
            super.addListener(d, e);
            return;
        }
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

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

            .createJMSConfigurationFromEndpointInfo(bus, endpointInfo, false);
        JMSDestination jmsDestination = new JMSDestination(bus, endpointInfo, jmsConfig);

        if (send) {
            // setMessageObserver
            observer = new MessageObserver() {
                public void onMessage(Message m) {
                    Exchange exchange = new ExchangeImpl();
                    exchange.setInMessage(m);
                    m.setExchange(exchange);
                    destMessage = m;
View Full Code Here

        final Message outMessage = new MessageImpl();
        setupMessageHeader(outMessage, null);
        final JMSDestination destination = setupJMSDestination(false);

        // set up MessageObserver for handling the conduit message
        MessageObserver observer = new MessageObserver() {
            public void onMessage(Message m) {
                Exchange exchange = new ExchangeImpl();
                exchange.setInMessage(m);
                m.setExchange(exchange);
                verifyReceivedMessage(m);
View Full Code Here

        headers.getProperty().add(excludeProp);

        final JMSDestination destination = setupJMSDestination(false);

        // set up MessageObserver for handling the conduit message
        MessageObserver observer = new MessageObserver() {
            public void onMessage(Message m) {
                Exchange exchange = new ExchangeImpl();
                exchange.setInMessage(m);
                m.setExchange(exchange);
                verifyReceivedMessage(m);
View Full Code Here

        }

        if (exchange.isSynchronous() || executor == null) {
            exchange.put(MessageObserver.class, this);
        } else {
            exchange.put(MessageObserver.class, new MessageObserver() {
                public void onMessage(final Message message) {
                    executor.execute(new Runnable() {
                        public void run() {
                            ClientImpl.this.onMessage(message);
                        }
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.