Package org.osgi.service.event

Examples of org.osgi.service.event.EventAdmin.sendEvent()


    public void process(Exchange exchange) throws Exception {
        EventAdmin admin = (EventAdmin) this.tracker.getService();
        if (admin != null) {
            Event event = getEvent(exchange);
            if (endpoint.isSend()) {
                admin.sendEvent(event);
            } else {
                admin.postEvent(event);
            }
        } else {
            throw new CamelExchangeException("EventAdmin service not present", exchange);
View Full Code Here


    private void sendAdminEvent() {
        ServiceReference eaRef = bc.getServiceReference(EventAdmin.class.getName());
        if (eaRef != null) {
            EventAdmin ea = (EventAdmin) bc.getService(eaRef);
            ea.sendEvent(new Event("jersey/test/DEPLOYED", new HashMap<String, String>() {

                {
                    put("context-path", "/");
                }
            }));
View Full Code Here

    private void sendAdminEvent() {
        ServiceReference eaRef = bc.getServiceReference(EventAdmin.class.getName());
        if (eaRef != null) {
            EventAdmin ea = (EventAdmin) bc.getService(eaRef);
            ea.sendEvent(new Event("jersey/test/DEPLOYED", new HashMap<String, String>() {

                {
                    put("context-path", "/");
                }
            }));
View Full Code Here

    EventAdmin eventAdmin = Activator.getEventAdmin();
    if (eventAdmin == null) {
      logger.error("No event admin found");
      return false;
    }
    eventAdmin.sendEvent(event);
    return true;
  }

  public boolean post(String topic, Object data) {
    Event event = constructEvent(topic, data);
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.