Examples of injectMessage()


Examples of org.apache.activemq.broker.inteceptor.MessageInterceptorRegistry.injectMessage()

        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {

                try {
                    registry.injectMessage(producerExchange, message);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
View Full Code Here

Examples of org.apache.activemq.broker.inteceptor.MessageInterceptorRegistry.injectMessage()

        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {
                message.setDestination(queue);
                try {
                    registry.injectMessage(producerExchange, message);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
View Full Code Here

Examples of org.apache.activemq.broker.inteceptor.MessageInterceptorRegistry.injectMessage()

        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {
                message.setDestination(queue);
                try {
                    registry.injectMessage(producerExchange, message);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
View Full Code Here

Examples of org.apache.activemq.broker.inteceptor.MessageInterceptorRegistry.injectMessage()

            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {

                try {
                    message.setDestination(testQueue);
                    registry.injectMessage(producerExchange,message);
                }catch(Exception e){
                    e.printStackTrace();
                }
            }
        });
View Full Code Here

Examples of org.apache.synapse.SynapseEnvironment.injectMessage()

        mc.setProperty(
                org.apache.synapse.Constants.MEDIATOR_SYNAPSE_ENV_PROPERTY,
                env);
        ////////////////////////////////////////////////////////////////////////
        SynapseMessage smc = new Axis2SynapseMessage(mc);
        env.injectMessage(smc);

        ///////////////////////////////////////////////////////////////////////
        // Response handling mechanism for 200/202 and 5XX
        // smc.isResponse =true then the response will be handle with 200 OK
        // else, response will be 202 OK without no http body
View Full Code Here

Examples of org.apache.synapse.SynapseEnvironment.injectMessage()

    public void testAddressingProcessor() throws Exception {
        SynapseEnvironment env = new Axis2SynapseEnvironment(
                Axis2EnvSetup.getSynapseConfigElement(synapsexml),
                Thread.currentThread().getContextClassLoader());
        SynapseMessage smc = new Axis2SynapseMessage(msgCtx);
        env.injectMessage(smc);
        assertTrue(((Boolean) smc.getProperty(
                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
        assertEquals("add",env.lookupProcessor("add").getName());
    }
View Full Code Here

Examples of org.apache.synapse.SynapseEnvironment.injectMessage()

        assertNotNull(env.getMasterProcessor());

        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        // throws exceptions if anything goes wrong
        env.injectMessage(sm);

    }
}
View Full Code Here

Examples of org.apache.synapse.axis2.Axis2SynapseEnvironment.injectMessage()

    public void testAddressingProcessor() throws Exception {
        SynapseEnvironment env = new Axis2SynapseEnvironment(
                Axis2EnvSetup.getSynapseConfigElement(synapsexml),
                Thread.currentThread().getContextClassLoader());
        SynapseMessage smc = new Axis2SynapseMessage(msgCtx);
        env.injectMessage(smc);
        assertTrue(((Boolean) smc.getProperty(
                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
        assertEquals("add",env.lookupProcessor("add").getName());
    }
View Full Code Here

Examples of org.apache.synapse.axis2.Axis2SynapseEnvironment.injectMessage()

        assertNotNull(env.getMasterProcessor());

        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        // throws exceptions if anything goes wrong
        env.injectMessage(sm);

    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.