Examples of CarbonEventBroker


Examples of org.wso2.carbon.event.broker.CarbonEventBroker

            ((CarbonNotificationManager)notificationManager).init(new HashMap<String, String>());
            subscriptionManager = new EmbeddedRegistryBasedSubscriptionManager();
        }

        try {
            CarbonEventBroker broker = (CarbonEventBroker)CarbonEventBroker.getInstance();
            broker.registerSubscriptionManager(subscriptionManager);
            broker.registerNotificationManager(notificationManager);
            subscriptionManager.init();
            return broker;
        } catch(Exception e) {
            String message = "Error while initializing Event Source";
            log.error(message, e);
View Full Code Here

Examples of org.wso2.carbon.event.core.internal.CarbonEventBroker

    protected void deactivate(ComponentContext context) {
        ServiceReference serviceReference =
                context.getBundleContext().getServiceReference(EventBroker.class.getName());

        CarbonEventBroker carbonEventBroker =
                (CarbonEventBroker) context.getBundleContext().getService(serviceReference);

        //unregister the service before cleaning up.
        this.eventServiceRegistration.unregister();

        try {
            carbonEventBroker.cleanUp();
        } catch (EventBrokerException e) {
            log.error("Can not clean up the carbon broker ", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.eventing.broker.CarbonEventBroker

            throw new ActivationException(message, e);
        }

        try {
            notificationManager.registerEventDispatcher(eventDispatcher);
            CarbonEventBroker broker;
            if (eventSourceName != null) {
                broker = (CarbonEventBroker)CarbonEventBroker.getInstance(eventSourceName);
            } else {
                broker = (CarbonEventBroker)CarbonEventBroker.getInstance();
            }
            broker.registerSubscriptionManager(subscriptionManager);
            broker.registerNotificationManager(notificationManager);
            subscriptionManager.init();
            if (eventSourceName != null) {
                dictionary.put(ATTR_NAME, eventSourceName);
            } else {
                dictionary.put(ATTR_NAME, DEFAULT_EVENT_SOURCE_NAME);
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.