Examples of registerFor()


Examples of org.olat.core.util.event.EventBus.registerFor()

    final OLATResourceable ores = OresHelper.createOLATResourceableType(SingleService.class.getCanonicalName());
    EventBus eventBus = CoordinatorManager.getCoordinator().getEventBus();
    // first fire event, second register as listener because we want not to receive our 'Started event'
    eventBus.fireEventToListenersOf(new ServiceStartedEvent(serviceName), ores );
    log.debug("fireEventToListenersOf serviceName=" + serviceName + "  ores=" + ores.getResourceableTypeName() + ":" + ores.getResourceableId());
    eventBus.registerFor(this, null, ores);
  }
 
  public void event(Event event) {
    log.debug("receive event=" + event + " serviceName=" + serviceName);
    // check: is it an event of my service
View Full Code Here

Examples of org.olat.core.util.event.EventBus.registerFor()

    EventBus bus = CoordinatorManager.getCoordinator().getEventBus();
    if (bus instanceof ClusterEventBus) {
      // send and wait some time until a message should arrive at the latest.
      ores1 = OresHelper.createOLATResourceableInstance("hellojms", new Long(123));
     
      bus.registerFor(new GenericEventListener(){

        public void event(Event event) {
          // TODO Auto-generated method stub
          System.out.println("event received!"+event);
          JMSTest.this.event = event;
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.