Package jadex.extension.agr
Class AGRSpace
- java.lang.Object
-
- jadex.extension.agr.AGRSpace
-
- All Implemented Interfaces:
IExtensionInstance
public class AGRSpace extends java.lang.Object implements IExtensionInstance
An AGR (agent-group-role) space.
-
-
Field Summary
Fields Modifier and Type Field Description protected MAGRSpaceInstance
config
The config.protected IExternalAccess
exta
The external access.protected java.util.Map<java.lang.String,Group>
groups
The groups.
-
Constructor Summary
Constructors Constructor Description AGRSpace(IExternalAccess exta, MAGRSpaceInstance config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroup(Group group)
Add a group to the space.void
componentAdded(IComponentDescription desc)
Called from application component, when a component was added.void
componentRemoved(IComponentDescription cid)
Called from application component, when a component was removed.Group
getGroup(java.lang.String name)
Get a group by name.IFuture<java.lang.Void>
init()
Initialize the extension.IFuture<java.lang.Void>
terminate()
Initialize the extension.
-
-
-
Field Detail
-
groups
protected java.util.Map<java.lang.String,Group> groups
The groups.
-
exta
protected IExternalAccess exta
The external access.
-
config
protected MAGRSpaceInstance config
The config.
-
-
Constructor Detail
-
AGRSpace
public AGRSpace(IExternalAccess exta, MAGRSpaceInstance config)
-
-
Method Detail
-
addGroup
public void addGroup(Group group)
Add a group to the space.- Parameters:
group
- The group to add.
-
getGroup
public Group getGroup(java.lang.String name)
Get a group by name.- Parameters:
name
- The name of the group.- Returns:
- The group (if any).
-
componentAdded
public void componentAdded(IComponentDescription desc)
Called from application component, when a component was added.- Parameters:
cid
- The id of the added component.
-
componentRemoved
public void componentRemoved(IComponentDescription cid)
Called from application component, when a component was removed.- Parameters:
cid
- The id of the removed component.
-
init
public IFuture<java.lang.Void> init()
Initialize the extension. Called once, when the extension is created.- Specified by:
init
in interfaceIExtensionInstance
-
terminate
public IFuture<java.lang.Void> terminate()
Initialize the extension. Called once, when the extension is terminate.- Specified by:
terminate
in interfaceIExtensionInstance
-
-