Package org.apache.savan.configuration

Examples of org.apache.savan.configuration.SubscriberBean


        OMElement urlAppenderElement = null;
        OMElement classElement = null;
        String name = null;
        String clazz = null;
        Object subscriber = null;
        SubscriberBean bean = null;

        nameElement = element.getFirstChildWithName(new QName(NAME));
        urlAppenderElement = element.getFirstChildWithName(new QName(URL_APPENDER));
        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");
        }

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

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

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

        bean = new SubscriberBean();
        bean.setName(name);
        bean.setClazz(clazz);
        subscribersMap.put(name, bean);
    }
View Full Code Here

TOP

Related Classes of org.apache.savan.configuration.SubscriberBean

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.