Package org.apache.cloudstack.framework.events

Examples of org.apache.cloudstack.framework.events.EventSubscriber.onEvent()


        for (UUID subscriberId : subscribers.keySet()) {
            Pair<EventTopic, EventSubscriber>  subscriberDetails =  subscribers.get(subscriberId);
            // if the event matches subscribers interested event topic then call back the subscriber with the event
            if (isEventMatchesTopic(event, subscriberDetails.first())) {
                EventSubscriber subscriber =  subscriberDetails.second();
                subscriber.onEvent(event);
            }
        }
    }

    @Override
View Full Code Here


                        String resourceUUID = getResourceUUIDFromRoutingKey(routingKey);
                        Event event = new Event(eventSource, eventCategory, eventType, resourceType, resourceUUID);
                        event.setDescription(new String(body));

                        // deliver the event to call back object provided by subscriber
                        subscriber.onEvent(event);
                    }
                }
            });

            // update the channel details for the subscription
View Full Code Here

                                    // create event object from the message details obtained from AMQP server
                                    Event event = new Event(eventSource, eventCategory, eventType, resourceType, resourceUUID);
                                    event.setDescription(new String(body));

                                    // deliver the event to call back object provided by subscriber
                                    subscriber.onEvent(event);
                                }
                            }
                        });

                        // update the channel details for the subscription
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.