Loading src/main/java/fr/greyc/mad/framework/model/IScheduler.java +17 −18 Original line number Diff line number Diff line Loading @@ -45,22 +45,22 @@ public interface IScheduler { * * This methods should be called by a DirectoryAdapter. * * @param mind Specifies the registered AgentMind. * @param body Specifies the controlled AgentBody. * @param mind Specifies the registered AgentMindID. * @param body Specifies the controlled AgentBodyID. * @throws MissingResourceException If the AgentBody is unavailable. * @throws SecurityException If the AgentMind declares an illegal control * with respect to the environment specification. */ public void register(AgentMind mind, AgentBody body) throws MissingResourceException, SecurityException; public void register(AgentMindID mind, AgentBodyID body) throws MissingResourceException, SecurityException; /** * Check if a given AgentBody ID exists in the environment. * * @param body Specifies the AgentBody. * @param body Specifies the AgentBodyID. * @return boolean * @throws MissingResourceException If the Environment is not set. */ public boolean isFound(AgentBody body) throws MissingResourceException; public boolean isFound(AgentBodyID body) throws MissingResourceException; /** * Check if the environment is ready to be simulated given the current Loading @@ -86,13 +86,13 @@ public interface IScheduler { * withing a given delay. Setting the delay to zero means there is no delay * (i.e. this method is a blocking method). * * @param mind Specifies the registered AgentMind. * @param mind Specifies the registered AgentMindID. * @param dealy Specifies the delay in milliseconds. * @return boolean * @throws MissingResourceException If the AgentMind ID does not exist. * @throws TimeoutException If the AgentMind does not answer within the delay. */ public boolean isAgentMindReady(AgentMind mind, int delay) throws MissingResourceException, TimeoutException; public boolean isAgentMindReady(AgentMindID mind, int delay) throws MissingResourceException, TimeoutException; /** * Ask an AgentMind for its action for a given AgentBody. The AgentMind must be Loading @@ -100,15 +100,15 @@ public interface IScheduler { * withing a given delay. Setting the delay to zero means there is no delay * (i.e. this method is a blocking method). * * @param mind Specifies the registered AgentMind. * @param body Specifies the controlled AgentBody. * @param mind Specifies the registered AgentMindID. * @param body Specifies the controlled AgentBodyID. * @param delay Specifies the delay in milliseconds. * @return Action The Action requested by the AgentMind. * @return Action The Action requested by the AgentMindID. * @throws MissingRessourceException If the AgentMind ID or the AgentBody ID do not exists. * @throws SecurityException If the AgentMind provided an Action for an AgentBody it does not control. * @throws TimeoutException If the AgentMind does not answer within the delay. */ public Action requestAction(AgentMind mind, AgentBody body, int delay) throws MissingResourceException, SecurityException, TimeoutException; public Action requestAction(AgentMindID mind, AgentBodyID body, int delay) throws MissingResourceException, SecurityException, TimeoutException; /** * Return a joint action built from the Action of the registred agents. An Loading Loading @@ -159,13 +159,13 @@ public interface IScheduler { * * This methods should be called by the Directory Adapter. * * @param mind Specifies the AgentMind that request the action. * @param mind Specifies the AgentMind ID that request the action. * @param myAction Specifies the Action requested by the AgentMind. * @param anArtifactID Specifies the Artifact ID within the Environment on which to apply the Action. * @param artifact Specifies the Artifact ID within the Environment on which to apply the Action. * @throws MissingRessourceException If the AgentMind, the Artifact ID or the Environment do not exist. * @throws SecurityException If the AgentMind requested an illegal Action. */ public void request(AgentMind mind, Action myAction, String anArtifactID) throws MissingResourceException, SecurityException; public void request(AgentMindID mind, Action myAction, ArtifactID artifact) throws MissingResourceException, SecurityException; /** * Send a given Message from a given AgentMind to another AgentMind. Loading @@ -177,7 +177,7 @@ public interface IScheduler { * @param anotherMind Specifies the receiver AgentMind. * @throws MissingRessourceException If one of the agents does not exist. */ public void send(AgentMind mind, Message myMessage, AgentMind anotherMind) throws MissingResourceException; public void send(AgentMindID mind, Message myMessage, AgentMindID anotherMind) throws MissingResourceException; /** * Give the list of actions an agent mind can perform. Loading @@ -187,9 +187,8 @@ public interface IScheduler { * @param mind is the mind of the agent * @return the list of actions */ public List<Action> getActions(AgentMindID mind); public List<Action> getActions(AgentMind mind); public List<Observation<?>> getObservations(AgentMind mind); public List<Observation<?>> getObservations(AgentMindID mind); } Loading
src/main/java/fr/greyc/mad/framework/model/IScheduler.java +17 −18 Original line number Diff line number Diff line Loading @@ -45,22 +45,22 @@ public interface IScheduler { * * This methods should be called by a DirectoryAdapter. * * @param mind Specifies the registered AgentMind. * @param body Specifies the controlled AgentBody. * @param mind Specifies the registered AgentMindID. * @param body Specifies the controlled AgentBodyID. * @throws MissingResourceException If the AgentBody is unavailable. * @throws SecurityException If the AgentMind declares an illegal control * with respect to the environment specification. */ public void register(AgentMind mind, AgentBody body) throws MissingResourceException, SecurityException; public void register(AgentMindID mind, AgentBodyID body) throws MissingResourceException, SecurityException; /** * Check if a given AgentBody ID exists in the environment. * * @param body Specifies the AgentBody. * @param body Specifies the AgentBodyID. * @return boolean * @throws MissingResourceException If the Environment is not set. */ public boolean isFound(AgentBody body) throws MissingResourceException; public boolean isFound(AgentBodyID body) throws MissingResourceException; /** * Check if the environment is ready to be simulated given the current Loading @@ -86,13 +86,13 @@ public interface IScheduler { * withing a given delay. Setting the delay to zero means there is no delay * (i.e. this method is a blocking method). * * @param mind Specifies the registered AgentMind. * @param mind Specifies the registered AgentMindID. * @param dealy Specifies the delay in milliseconds. * @return boolean * @throws MissingResourceException If the AgentMind ID does not exist. * @throws TimeoutException If the AgentMind does not answer within the delay. */ public boolean isAgentMindReady(AgentMind mind, int delay) throws MissingResourceException, TimeoutException; public boolean isAgentMindReady(AgentMindID mind, int delay) throws MissingResourceException, TimeoutException; /** * Ask an AgentMind for its action for a given AgentBody. The AgentMind must be Loading @@ -100,15 +100,15 @@ public interface IScheduler { * withing a given delay. Setting the delay to zero means there is no delay * (i.e. this method is a blocking method). * * @param mind Specifies the registered AgentMind. * @param body Specifies the controlled AgentBody. * @param mind Specifies the registered AgentMindID. * @param body Specifies the controlled AgentBodyID. * @param delay Specifies the delay in milliseconds. * @return Action The Action requested by the AgentMind. * @return Action The Action requested by the AgentMindID. * @throws MissingRessourceException If the AgentMind ID or the AgentBody ID do not exists. * @throws SecurityException If the AgentMind provided an Action for an AgentBody it does not control. * @throws TimeoutException If the AgentMind does not answer within the delay. */ public Action requestAction(AgentMind mind, AgentBody body, int delay) throws MissingResourceException, SecurityException, TimeoutException; public Action requestAction(AgentMindID mind, AgentBodyID body, int delay) throws MissingResourceException, SecurityException, TimeoutException; /** * Return a joint action built from the Action of the registred agents. An Loading Loading @@ -159,13 +159,13 @@ public interface IScheduler { * * This methods should be called by the Directory Adapter. * * @param mind Specifies the AgentMind that request the action. * @param mind Specifies the AgentMind ID that request the action. * @param myAction Specifies the Action requested by the AgentMind. * @param anArtifactID Specifies the Artifact ID within the Environment on which to apply the Action. * @param artifact Specifies the Artifact ID within the Environment on which to apply the Action. * @throws MissingRessourceException If the AgentMind, the Artifact ID or the Environment do not exist. * @throws SecurityException If the AgentMind requested an illegal Action. */ public void request(AgentMind mind, Action myAction, String anArtifactID) throws MissingResourceException, SecurityException; public void request(AgentMindID mind, Action myAction, ArtifactID artifact) throws MissingResourceException, SecurityException; /** * Send a given Message from a given AgentMind to another AgentMind. Loading @@ -177,7 +177,7 @@ public interface IScheduler { * @param anotherMind Specifies the receiver AgentMind. * @throws MissingRessourceException If one of the agents does not exist. */ public void send(AgentMind mind, Message myMessage, AgentMind anotherMind) throws MissingResourceException; public void send(AgentMindID mind, Message myMessage, AgentMindID anotherMind) throws MissingResourceException; /** * Give the list of actions an agent mind can perform. Loading @@ -187,9 +187,8 @@ public interface IScheduler { * @param mind is the mind of the agent * @return the list of actions */ public List<Action> getActions(AgentMindID mind); public List<Action> getActions(AgentMind mind); public List<Observation<?>> getObservations(AgentMind mind); public List<Observation<?>> getObservations(AgentMindID mind); }