Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.MessageObserver


    }

    @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


     * Called prior to the interceptor chain being traversed.
     *
     * @param message the current Message
     */
    public void prepare(Message message) {
        MessageObserver observer =
            message.getExchange().get(MessageObserver.class);
        if (observer != null) {
            selectedConduit.setMessageObserver(observer);
        }
    }
View Full Code Here

                if (conduitInitiatorMgr != null) {
                    ConduitInitiator conduitInitiator =
                        conduitInitiatorMgr.getConduitInitiator(transportID);
                    if (conduitInitiator != null) {
                        selectedConduit = conduitInitiator.getConduit(ei);
                        MessageObserver observer =
                            exchange.get(MessageObserver.class);
                        if (observer != null) {
                            selectedConduit.setMessageObserver(observer);
                        } else {
                            getLogger().warning("MessageObserver not found");
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

        LOG.fine("Server is stopping.");
        if (mgr != null) {
            mgr.stopServer(this);
        }
       
        MessageObserver mo = getDestination().getMessageObserver();
        if (mo instanceof MultipleEndpointObserver) {
            ((MultipleEndpointObserver) mo).getEndpoints().remove(endpoint);
        } else {
            getDestination().setMessageObserver(null);
            getDestination().shutdown();
View Full Code Here

                    = 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

       
        cs.setEndpoint(endpoint);
        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

    @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

                    = 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

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.