io.sarl.sre.janus.services.context
Interface ContextService
All Superinterfaces:
org.arakhne.afc.services.IService
All Known Implementing Classes:
HazelcastContextService, AbstractContextService, AbstractInjectionBasedContextService, MemoryBasedContextService
interface ContextService
implements org.arakhne.afc.services.IService
This service enables to store the contexts and to manage the spaces in the SRE platform.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Property Summary
Modifier and type Property and description
java.util.Collection<E> allContexts
Replies all the known contexts.
Context rootContext
Replies the root context.
Action Summary
Modifier and type Action and description
abstract Context createContext(UUID,UUID,Agent)
Create a new context instance and register it into the internal repository.
abstract Context createContextWithoutRegistration(UUID,UUID,Agent)
Create a new context instance and do not register it into the repository.
abstract java.util.Collection<E> getAllContexts
Replies all the known contexts.
abstract Context getContext(UUID)
Replies an existing context instance.
abstract Context getRootContext
Replies the root context.
abstract Context removeContext(UUID)
Remove the context instance.
Property Details
allContexts
val allContexts : java.util.Collection<E>
Replies all the known contexts.

This property is an alias for the action: getAllContexts

Returns:
a view on all the contexts.
Since:
0.10
rootContext
val rootContext : Context
Replies the root context.

This property is an alias for the action: getRootContext

Returns:
the root context.
Action Details
createContext(UUID,UUID,Agent)
def createContext(UUID,UUID,Agent) : Context
Create a new context instance and register it into the internal repository.
Parameters:
contextID - the id of the context to create.
defaultSpaceID - the id of the default space of the context to create.
owner - is the owner of the context. If null, the context is the root context.
Returns:
the context.
createContextWithoutRegistration(UUID,UUID,Agent)
def createContextWithoutRegistration(UUID,UUID,Agent) : Context
Create a new context instance and do not register it into the repository.
Parameters:
contextID - the id of the context to create.
defaultSpaceID - the id of the default space of the context to create.
owner - is the owner of the context. If null, the context is the root context.
Returns:
the context.
getAllContexts
def getAllContexts : java.util.Collection<E>
Replies all the known contexts.
Returns:
a view on all the contexts.
Since:
0.10
getContext(UUID)
def getContext(UUID) : Context
Replies an existing context instance. This function does not create the instance of the context if it was not created.
Parameters:
contextID - the id of the context to create
Returns:
the context, null .
getRootContext
def getRootContext : Context
Replies the root context.
Returns:
the root context.
removeContext(UUID)
def removeContext(UUID) : Context
Remove the context instance.
Parameters:
contextID - the id of the context to remove
Returns:
the removed context, null if no context with the given ID was found.