Package jade.core

Examples of jade.core.AgentState


    }
   
    private void handleInformStateChanged(VerticalCommand cmd) {
      Object[] params = cmd.getParams();
      AID id = (AID)params[0];
      AgentState from = (AgentState)params[1];
      AgentState to = (AgentState)params[2];
     
      fireChangedAgentState(id, from, to);
    }
View Full Code Here


      // Activate generation of behaviour-related events on the
      // target agent
      a.setGenerateBehaviourEvents(true);
     
      // Retrieve the current agent state
      AgentState as = a.getAgentState();
     
      // Retrieve the list of pending ACL messages
      List messages = new LinkedList();
      myContainer.fillListFromMessageQueue(messages, a);
     
View Full Code Here

  public void changedAgentState(AgentEvent ev) {
    if (state == ACTIVE_STATE) {
      AID id = ev.getAgent();
      if(observedAgents.contains(id)) {
       
        AgentState from = ev.getFrom();
        AgentState to = ev.getTo();
       
        ChangedAgentState cas = new ChangedAgentState();
        cas.setAgent(id);
        cas.setFrom(from);
        cas.setTo(to);
View Full Code Here

   
    private void handleRequestStateChange(VerticalCommand cmd) throws IMTPException, JADESecurityException, NotFoundException, ServiceException {
     
      Object[] params = cmd.getParams();
      AID agentID = (AID)params[0];
      AgentState as = (AgentState)params[1];
     
      int newState = Agent.AP_MIN;
      if(as.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.SUSPENDED)) {
        newState = Agent.AP_SUSPENDED;
      }
      else if(as.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.WAITING)) {
        newState = Agent.AP_WAITING;
      }
      else if(as.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.ACTIVE)) {
        newState = Agent.AP_ACTIVE;
      }
     
      MainContainer impl = myContainer.getMain();
      if(impl != null) {
View Full Code Here

   
    private void handleInformStateChanged(VerticalCommand cmd) {
     
      Object[] params = cmd.getParams();
      AID target = (AID)params[0];
      AgentState from = (AgentState)params[1];
      AgentState to = (AgentState)params[2];
     
      if (to.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.SUSPENDED)) {
        try {
          // Notify the main container through its slice
          AgentManagementSlice mainSlice = (AgentManagementSlice)getSlice(MAIN_SLICE);
         
          try {
View Full Code Here

    private void handleInformStateChanged(VerticalCommand cmd) {

      Object[] params = cmd.getParams();
      AID target = (AID)params[0];
      AgentState from = (AgentState)params[1];
      AgentState to = (AgentState)params[2];

      if (to.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.SUSPENDED)) {
        try {
          // Notify the main container through its slice
          AgentManagementSlice mainSlice = (AgentManagementSlice)getSlice(MAIN_SLICE);

          try {
View Full Code Here

TOP

Related Classes of jade.core.AgentState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.