Package org.apache.synapse.message.processors

Examples of org.apache.synapse.message.processors.MessageProcessor


     *                   Message processor
     */
    public void modifyMessageProcessor(String xml) throws AxisFault {
        try {
            OMElement msElem = createElement(xml);
            MessageProcessor messageProcessor =
                    MessageProcessorFactory.createMessageProcessor(msElem);
            if (messageProcessor != null && messageProcessor.getName() != null) {
                SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
                MessageProcessor removedProcessor =
                        synapseConfiguration.removeMessageProcessor(messageProcessor.getName());
                if (removedProcessor != null) {
                    removedProcessor.destroy();
                }
                messageProcessor.init(getSynapseEnvironment());
                String fileName = ServiceBusUtils.generateFileName(messageProcessor.getName());
                messageProcessor.setFileName(fileName);
                synapseConfiguration.addMessageProcessor(messageProcessor.getName(),
View Full Code Here


     */
    public String getMessageProcessor(String name) throws AxisFault {
        SynapseConfiguration configuration = getSynapseConfiguration();

        assert configuration != null;
        MessageProcessor processor = configuration.getMessageProcessors().get(name);
        String xml= null;
        if (processor != null) {
            xml = MessageProcessorSerializer.serializeMessageProcessor(null, processor).toString();
        } else {
            handleException(log, "Message Processor " + name + " does not exist", null);
View Full Code Here

    public void deleteMessageProcessor(String name) throws AxisFault {
        SynapseConfiguration configuration = getSynapseConfiguration();

        assert configuration != null;
        if (configuration.getMessageProcessors().containsKey(name)) {
            MessageProcessor processor  =configuration.removeMessageProcessor(name);
            String fileName = processor.getFileName();
            if(processor != null) {
                processor.destroy();
            }


            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.deleteItem(processor.getName(),
                    fileName,ServiceBusConstants.ITEM_TYPE_MESSAGE_PROCESSOR);

        } else {
            handleException(log, "Message Store " + name + " does not exist", null);
        }
View Full Code Here

TOP

Related Classes of org.apache.synapse.message.processors.MessageProcessor

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.