public interface AgentContext
Modifier and Type | Method and Description |
---|---|
<S extends Space> |
createSpace(spec : Class<? extends SpaceSpecification<S>>,
spaceUUID : UUID,
creationParams : Object*)
Create an instance of space following the given specification.
|
EventSpace |
getDefaultSpace()
Replies the default space of the context.
|
UUID |
getID()
Replies the identifier of the context.
|
default <S extends Space> |
getOrCreateSpace(spec : Class<? extends SpaceSpecification<S>>,
spaceUUID : UUID,
creationParams : Object*)
Deprecated.
|
<S extends Space> |
getOrCreateSpaceWithID(spec : Class<? extends SpaceSpecification<S>>,
spaceUUID : UUID,
creationParams : Object*)
Retreive or create an instance of space with the given identifier.
|
default <S extends Space> |
getOrCreateSpaceWithID(spaceUUID : UUID,
spec : Class<? extends SpaceSpecification<S>>,
creationParams : Object*)
Deprecated.
|
<S extends Space> |
getOrCreateSpaceWithSpec(spec : Class<? extends SpaceSpecification<S>>,
spaceUUID : UUID,
creationParams : Object*)
Retreive or create an instance of space which was created with the given specification.
|
<S extends Space> |
getSpace(spaceUUID : UUID)
Retreive, but do not create, an instance of space following the given ID.
|
SynchronizedIterable<? extends Space> |
getSpaces()
Replies all the spaces defined in this context.
|
<S extends Space> |
getSpaces(spec : Class<? extends SpaceSpecification<S>>)
Replies all the spaces that are implementing the given specification.
|
@Pure
def
getID() : UUID
AgentContext
@Pure
def
getDefaultSpace() : EventSpace
AgentContext
event-based space
.@Pure
def
getSpaces() : SynchronizedIterable<? extends Space>
AgentContext
@Puredef
getSpaces(spec : Class<? extends SpaceSpecification<S>>) : SynchronizedIterable<S>with
<S extends Space>
AgentContext
S
- - type of the replied space.spec
- specification of the space to retreive.def
createSpace(spec : Class<? extends SpaceSpecification<S>>, spaceUUID : UUID, creationParams : Object*) : Swith
<S extends Space>
AgentContext
null
.
If you want to find an existing space prior to the creation of
a new one, you should use AgentContext.getOrCreateSpace(Class, UUID, Object...)
.S
- - type of the created space.spec
- specification of the space to create.spaceUUID
- identifier of the new space.creationParams
- parameters to pass to the space constructor.null
if the space already exists.AgentContext.getOrCreateSpace(Class, UUID, Object...)
,
AgentContext.getSpace(UUID)
@Deprecated defaultdef
getOrCreateSpace(spec : Class<? extends SpaceSpecification<S>>, spaceUUID : UUID, creationParams : Object*) : Swith
<S extends Space>
AgentContext.getOrCreateSpaceWithSpec(Class, UUID, Object...)
AgentContext
This function tries to find a space that was created with the given specification. If none was found, this function creates a new space with the given space identifier and creation parameters.
Caution: The spaceUUID
parameter is used only
if no existing space created with the given specification was found.
S
- - type of the replied space.spec
- specification of the space to retreive/create.spaceUUID
- identifier used only when creating the space.creationParams
- parameters to pass to the space constructor.null
.AgentContext.getOrCreateSpaceWithID(UUID, Class, Object...)
,
AgentContext.createSpace(Class, UUID, Object...)
,
AgentContext.getSpace(UUID)
def
getOrCreateSpaceWithSpec(spec : Class<? extends SpaceSpecification<S>>, spaceUUID : UUID, creationParams : Object*) : Swith
<S extends Space>
AgentContext
This function tries to find a space that was created with the given specification. If none was found, this function creates a new space with the given space identifier and creation parameters.
Caution: The spaceUUID
parameter is used only
if no existing space created with the given specification was found.
S
- - type of the replied space.spec
- specification of the space to retreive/create.spaceUUID
- identifier used only when creating the space.creationParams
- parameters to pass to the space constructor.null
.AgentContext.getOrCreateSpaceWithID(UUID, Class, Object...)
,
AgentContext.createSpace(Class, UUID, Object...)
,
AgentContext.getSpace(UUID)
@Deprecated defaultdef
getOrCreateSpaceWithID(spaceUUID : UUID, spec : Class<? extends SpaceSpecification<S>>, creationParams : Object*) : Swith
<S extends Space>
AgentContext.getOrCreateSpaceWithID(Class, UUID, Object...)
AgentContext
This function tries to find a space with the given identifier. If none was found, this function creates a new space with the given specification and creation parameters.
Caution: The spaceUUID
parameter is given to
the specification when creating the space.
S
- - type of the replied space.spaceUUID
- identifier of the space.spec
- specification of the space for creating the space.creationParams
- parameters to pass to the space constructor.null
.AgentContext.getOrCreateSpaceWithID(UUID, Class, Object...)
,
AgentContext.createSpace(Class, UUID, Object...)
,
AgentContext.getSpace(UUID)
def
getOrCreateSpaceWithID(spec : Class<? extends SpaceSpecification<S>>, spaceUUID : UUID, creationParams : Object*) : Swith
<S extends Space>
AgentContext
This function tries to find a space with the given identifier. If none was found, this function creates a new space with the given specification and creation parameters.
Caution: The spaceUUID
parameter is given to
the specification when creating the space.
S
- - type of the replied space.spaceUUID
- identifier of the space.spec
- specification of the space for creating the space.creationParams
- parameters to pass to the space constructor.null
.AgentContext.getOrCreateSpaceWithID(UUID, Class, Object...)
,
AgentContext.createSpace(Class, UUID, Object...)
,
AgentContext.getSpace(UUID)
@Puredef
getSpace(spaceUUID : UUID) : Swith
<S extends Space>
AgentContext
null
.S
- - type of the replied space.spaceUUID
- identifier of the space.null
if there is no space found.AgentContext.createSpace(Class, UUID, Object...)
,
AgentContext.getOrCreateSpace(Class, UUID, Object...)
Copyright © 2018 the original authors or authors.