io.sarl.sre.janus.internal.eventguard
Class AbstractBehaviorGuardEvaluatorRegistry<REGT>
Type Parameters:
REGT - the type of stored data for registered listeners.
All Superinterfaces:
IBehaviorGuardEvaluatorRegistry
All Known Subclasses:
PolymorphicBehaviorGuardEvaluatorRegistry, ReflectBehaviorGuardEvaluatorRegistry
abstract class AbstractBehaviorGuardEvaluatorRegistry<REGT>
extends java.lang.Object
implements IBehaviorGuardEvaluatorRegistry
Registry of all BehaviorGuardEvaluator classes containing a method to evaluate the guard of a given behavior (on clause in SARL behavior).

This class is thread-safe.

Two types of listeners are supported:
  • Registered listener: it is registered with the function of the same name. It is notified when an event should be provided to anyone;
  • Direct-access listener: it is not registered (if it is, it does not matter). It is notified when it is passed as argument of a notification function. In this case, only this listener will receive the event.
Parameters:
<REGT> - the type of stored data for registered listeners.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Property Summary
Modifier and type Property and description
java.util.concurrent.ConcurrentMap<K,V> internalDataStructureForRegisteredListeners
Replies the internal data structure for the registered listeners.
protected org.eclipse.xtext.xbase.lib.Functions.Function2<P1,P2,Result> internalEvaluatorFilterForRegisteredListeners
Replies the filtering of evaluator.
protected org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result> internalEvaluatorMapperForRegisteredListeners
Replies the mapper from the internal guard evaluator description of register listeners to the public description.
Field Summary
Modifier and type Field and description
protected val Factories factories
Constructor Summary
Constructor and description
new(Provider<T>)
Action Summary
Modifier and type Action and description
ConcurrentCollection<T> getBehaviorGuardEvaluatorsForRegisteredListeners(Event)
abstract java.util.concurrent.ConcurrentMap<K,V> getInternalDataStructureForRegisteredListeners
Replies the internal data structure for the registered listeners.
protected abstract org.eclipse.xtext.xbase.lib.Functions.Function2<P1,P2,Result> getInternalEvaluatorFilterForRegisteredListeners
Replies the filtering of evaluator.
protected org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result> getInternalEvaluatorMapperForDirectAccessListeners(Object)
Replies the mapper from the internal guard evaluator description of direct-access listeners to the public description.
protected abstract org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result> getInternalEvaluatorMapperForRegisteredListeners
Replies the mapper from the internal guard evaluator description of register listeners to the public description.
ConcurrentSet<T> getRegisteredEventListeners(Class<T>)
int getRegisteredEventListeners(Class<T>,Set<E>)
boolean hasRegisteredEventListener(Class<T>)
void unregister(Class<T>,Function1<Param,Result>)
void unregisterAll(Function1<Param,Result>)
Property Details
internalDataStructureForRegisteredListeners
val internalDataStructureForRegisteredListeners : java.util.concurrent.ConcurrentMap<K,V>
Replies the internal data structure for the registered listeners.

This property is an alias for the action: getInternalDataStructureForRegisteredListeners

Returns:
the internal data structure
internalEvaluatorFilterForRegisteredListeners
protected val internalEvaluatorFilterForRegisteredListeners : org.eclipse.xtext.xbase.lib.Functions.Function2<P1,P2,Result>
Replies the filtering of evaluator.

This property is an alias for the action: getInternalEvaluatorFilterForRegisteredListeners

Returns:
the filter
internalEvaluatorMapperForRegisteredListeners
protected val internalEvaluatorMapperForRegisteredListeners : org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result>
Replies the mapper from the internal guard evaluator description of register listeners to the public description.

This property is an alias for the action: getInternalEvaluatorMapperForRegisteredListeners

Returns:
the internal data structure
Field Details
factories
protected val factories : Factories
Constructor Details
new(Provider<T>)
new(Provider<T>)
Action Details
getBehaviorGuardEvaluatorsForRegisteredListeners(Event)
def getBehaviorGuardEvaluatorsForRegisteredListeners(Event) : ConcurrentCollection<T>
getInternalDataStructureForRegisteredListeners
def getInternalDataStructureForRegisteredListeners : java.util.concurrent.ConcurrentMap<K,V>
Replies the internal data structure for the registered listeners.
Returns:
the internal data structure
getInternalEvaluatorFilterForRegisteredListeners
protected def getInternalEvaluatorFilterForRegisteredListeners : org.eclipse.xtext.xbase.lib.Functions.Function2<P1,P2,Result>
Replies the filtering of evaluator.
Returns:
the filter
getInternalEvaluatorMapperForDirectAccessListeners(Object)
protected def getInternalEvaluatorMapperForDirectAccessListeners(Object) : org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result>
Replies the mapper from the internal guard evaluator description of direct-access listeners to the public description.
Parameters:
listener - the listener for which the guard evaluator should be replied.
Returns:
the internal data structure
Since:
0.12
getInternalEvaluatorMapperForRegisteredListeners
protected def getInternalEvaluatorMapperForRegisteredListeners : org.eclipse.xtext.xbase.lib.Functions.Function1<Param,Result>
Replies the mapper from the internal guard evaluator description of register listeners to the public description.
Returns:
the internal data structure
getRegisteredEventListeners(Class<T>)
def getRegisteredEventListeners(Class<T>) : ConcurrentSet<T>

with TT

getRegisteredEventListeners(Class<T>,Set<E>)
def getRegisteredEventListeners(Class<T>,Set<E>) : int

with TT

hasRegisteredEventListener(Class<T>)
def hasRegisteredEventListener(Class<T>) : boolean
unregister(Class<T>,Function1<Param,Result>)
def unregister(Class<T>,Function1<Param,Result>)
unregisterAll(Function1<Param,Result>)
def unregisterAll(Function1<Param,Result>)