public void processMessage()

in modules/core/src/main/java/org/apache/savan/messagereceiver/MessageReceiverDelegator.java [37:85]


    public void processMessage(SavanMessageContext smc) throws SavanException {
        MessageContext msgContext = smc.getMessageContext();

        //setting the Protocol
        Protocol protocol = smc.getProtocol();

        if (protocol == null) {
            //this message does not have a matching protocol
            //so let it go
            throw new SavanException("Cannot find a matching protocol");
        }

        smc.setProtocol(protocol);

        AxisService axisService = msgContext.getAxisService();
        if (axisService == null)
            throw new SavanException("Service context is null");

        //setting the AbstractSubscriber Store
        Parameter parameter = axisService.getParameter(SavanConstants.SUBSCRIBER_STORE);
        if (parameter == null) {
            setSubscriberStore(smc);
        }

        UtilFactory utilFactory = smc.getProtocol().getUtilFactory();
        utilFactory.initializeMessage(smc);

        int messageType = smc.getMessageType();

        SubscriptionProcessor processor = utilFactory.createSubscriptionProcessor();
        processor.init(smc);
        switch (messageType) {
            case SavanConstants.MessageTypes.SUBSCRIPTION_MESSAGE:
                processor.subscribe(smc);
                break;
            case SavanConstants.MessageTypes.UNSUBSCRIPTION_MESSAGE:
                processor.unsubscribe(smc);
                break;
            case SavanConstants.MessageTypes.RENEW_MESSAGE:
                processor.renewSubscription(smc);
                break;
            case SavanConstants.MessageTypes.PUBLISH:
                processor.publish(smc);
                break;
            case SavanConstants.MessageTypes.GET_STATUS_MESSAGE:
                processor.getStatus(smc);
                break;
        }
    }