io.sarl.lang.core
Interface EventSpace
All Superinterfaces:
Space
All Known Implementing Classes:
AbstractEventSpace, OpenLocalEventSpace
interface EventSpace
implements Space
Event driven Interaction Space for agents.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
core
Property Summary
Action Summary
Modifier and type Action and description
default void emit(UUID,Event)
Emits the event inside this space.
abstract void emit(UUID,Event,Scope<T>)
Emits the event inside this space with the given scope.
abstract Address getAddress(UUID)
Returns the address of the agent identified by id.
Action Details
emit(UUID,Event)
def emit(UUID,Event)
Emits the event inside this space. All registered agents will receive the event.

This function does not change the source of the event if it was set.

If the given event has no specified source, the emit function uses the eventSource parameter to set the source's address.
Parameters:
eventSource - the sender of the event.
event - the event to emit in the space.
Since:
0.6
emit(UUID,Event,Scope<T>)
def emit(UUID,Event,Scope<T>)
Emits the event inside this space with the given scope. Only agents matching the scope will receive the event.

This function does not change the source of the event if it was set.

If the given event has no specified source, the emit function uses the eventSource parameter to set the source's address.
Parameters:
eventSource - the sender of the event.
event - the event to emit in the space.
scope - the definition of the list of receivers of the event.
Since:
0.6
getAddress(UUID)
def getAddress(UUID) : Address
Returns the address of the agent identified by id.
Parameters:
id - the agent's id.
Returns:
the agent's address in this space.