private void processSubscriber()

in modules/core/src/main/java/org/apache/savan/configuration/ConfigurationManager.java [375:401]


    private void processSubscriber(OMElement element) throws SavanException {
        OMElement nameElement = element.getFirstChildWithName(new QName(NAME));
        OMElement urlAppenderElement = element.getFirstChildWithName(new QName(URL_APPENDER));
        OMElement classElement = element.getFirstChildWithName(new QName(CLASS));

        if (nameElement == null)
            throw new SavanException("Name element is not present within the AbstractSubscriber");
        if (classElement == null)
            throw new SavanException("Class element is not present within the Filter");

        String name = nameElement.getText();
        String clazz = classElement.getText();

        //initialize the class to check weather it is valid
        Object obj = getObject(clazz);

        if (!(obj instanceof Subscriber)) {
            String message = "Class " + clazz + " does not implement the  Subscriber interface.";
            throw new SavanException(message);
        }

        SubscriberBean bean = new SubscriberBean();
        bean.setName(name);
        bean.setClazz(clazz);

        subscribersMap.put(name, bean);
    }