massim.eismassim
Class EnvironmentInterface
java.lang.Object
eis.EIDefaultImpl
massim.eismassim.EnvironmentInterface
- All Implemented Interfaces:
- eis.EnvironmentInterfaceStandard, java.io.Serializable, java.lang.Runnable
public class EnvironmentInterface
- extends eis.EIDefaultImpl
- implements java.lang.Runnable
This is an environment interface to the MASSim-server.
It is intended to facilitate the comminication between
agent-platforms that support the EIS-0.3 standard on
one side and the MASSim-server on the other side.
The environment interface is configured via a
configuration-file that is parsed and evaluated when
instantiating the class. This includes creating entities,
that is valid connections to the MASSim-server, using
the credentials that are provided in that very
configuration-file.
- Author:
- tristanbehrens
- See Also:
- Serialized Form
Methods inherited from class eis.EIDefaultImpl |
addEntity, addEntity, attachAgentListener, attachEnvironmentListener, deleteEntity, detachAgentListener, detachEnvironmentListener, freeAgent, freeEntity, freePair, getAgents, getAllPercepts, getAssociatedAgents, getAssociatedEntities, getEntities, getFreeEntities, getState, init, isKillSupported, isPauseSupported, isStartSupported, isStateTransitionValid, kill, notifyAgents, notifyAgentsViaEntity, notifyDeletedEntity, notifyFreeEntity, notifyNewEntity, pause, performAction, queryEntityProperty, queryProperty, registerAgent, setState, setType, start, unregisterAgent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnvironmentInterface
public EnvironmentInterface()
- Instantiates the environment-interface.
Firstly a configuration file is parsed and used to
instantiate the entities. After that a first
attempt is made to connect the entities to the
MASSim-Server.
getAllPerceptsFromEntity
protected java.util.LinkedList<eis.iilang.Percept> getAllPerceptsFromEntity(java.lang.String entity)
throws eis.exceptions.PerceiveException,
eis.exceptions.NoEnvironmentException
- Specified by:
getAllPerceptsFromEntity
in class eis.EIDefaultImpl
- Throws:
eis.exceptions.PerceiveException
eis.exceptions.NoEnvironmentException
isSupportedByEntity
protected boolean isSupportedByEntity(eis.iilang.Action action,
java.lang.String entity)
- Specified by:
isSupportedByEntity
in class eis.EIDefaultImpl
isSupportedByEnvironment
protected boolean isSupportedByEnvironment(eis.iilang.Action action)
- Specified by:
isSupportedByEnvironment
in class eis.EIDefaultImpl
isSupportedByType
protected boolean isSupportedByType(eis.iilang.Action action,
java.lang.String type)
- Specified by:
isSupportedByType
in class eis.EIDefaultImpl
performEntityAction
protected eis.iilang.Percept performEntityAction(java.lang.String entity,
eis.iilang.Action action)
throws eis.exceptions.ActException
- Specified by:
performEntityAction
in class eis.EIDefaultImpl
- Throws:
eis.exceptions.ActException
requiredVersion
public java.lang.String requiredVersion()
- Specified by:
requiredVersion
in interface eis.EnvironmentInterfaceStandard
getType
public java.lang.String getType(java.lang.String entity)
- Specified by:
getType
in interface eis.EnvironmentInterfaceStandard
- Overrides:
getType
in class eis.EIDefaultImpl
isInitSupported
public boolean isInitSupported()
- Specified by:
isInitSupported
in interface eis.EnvironmentInterfaceStandard
- Overrides:
isInitSupported
in class eis.EIDefaultImpl
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
sendNotifications
public void sendNotifications(java.lang.String name,
java.util.Collection<eis.iilang.Percept> percepts)
associateEntity
public void associateEntity(java.lang.String agent,
java.lang.String entity)
throws eis.exceptions.RelationException
- Specified by:
associateEntity
in interface eis.EnvironmentInterfaceStandard
- Overrides:
associateEntity
in class eis.EIDefaultImpl
- Throws:
eis.exceptions.RelationException
requestNewStatistics
public Statistic requestNewStatistics(int simCount)
Copyright © 2012. All Rights Reserved.