org.olat.commons.coordinate.singlevm
Class SingleVMEventBus

java.lang.Object
  extended by org.olat.core.util.event.AbstractEventBus
      extended by org.olat.commons.coordinate.singlevm.SingleVMEventBus
All Implemented Interfaces:
EventBus

public class SingleVMEventBus
extends AbstractEventBus

implementation of the olat system bus within one vm

Author:
Felix Jost

Constructor Summary
SingleVMEventBus()
          access by both cluster and singleVM version for the user-session event bus -> thus public constructor
 
Method Summary
 void fireEventToListenersOf(MultiUserEvent event, OLATResourceable ores)
          this impl directly fires the event to all listeners.
 int getListeningIdentityCntFor(OLATResourceable ores)
          this imple simply counts the identities on this bus.
 
Methods inherited from class org.olat.core.util.event.AbstractEventBus
deregisterFor, getListeningIdentityNamesFor, getUnmodifiableInfoCenter, registerFor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleVMEventBus

public SingleVMEventBus()
access by both cluster and singleVM version for the user-session event bus -> thus public constructor

Method Detail

fireEventToListenersOf

public void fireEventToListenersOf(MultiUserEvent event,
                                   OLATResourceable ores)
this impl directly fires the event to all listeners.

Specified by:
fireEventToListenersOf in interface EventBus
Specified by:
fireEventToListenersOf in class AbstractEventBus
Parameters:
event - the OLATResourceableEvent (must be serializable!, for multiple server olat installations)
ores - the OLATResourceable

getListeningIdentityCntFor

public int getListeningIdentityCntFor(OLATResourceable ores)
this imple simply counts the identities on this bus.

Specified by:
getListeningIdentityCntFor in interface EventBus
Specified by:
getListeningIdentityCntFor in class AbstractEventBus
Parameters:
ores - the resourceable
Returns:
the number of people currently using this resource