Package ise.mace.actions

Examples of ise.mace.actions.ApplyToGroup


  {
    String gid = chooseGroup();
    if (gid == null ? true : gid.equals(dm.getGroupId())) return;
    if (gid.equals(leaveGroup))
    {
      ec.act(new ApplyToGroup(gid), getId(), authCode);
      //Bug source
      //this.dm.setGroup(null);
      //Bug source end
      return;
    }
    if (getConn().isGroupId(gid)) ec.act(new ApplyToGroup(gid), getId(),
              authCode);
  }
View Full Code Here


    }

    @Override
    public Input handle(Action action, String actorID)
    {
      final ApplyToGroup app = (ApplyToGroup)action;
      if (app.getGroup().equals(AbstractAgent.leaveGroup))
      {
        String old_group = dmodel.getAgentById(actorID).getGroupId();

        if (old_group != null)
        {
          sim.getPlayer(old_group).enqueueInput(new LeaveNotification(
                  sim.getTime(), LeaveNotification.Reasons.Other, actorID));
        }
        logger.log(Level.FINE, "Agent {0} has rejoined the free agents group.",
                nameOf(actorID));
      }
      else
      {
        sim.getPlayer(app.getGroup()).enqueueInput(new JoinRequest(sim.getTime(),
                actorID));
        logger.log(Level.FINE, "Agent {0} has attempted to join group {1}",
                new Object[]
                {
                  nameOf(actorID),
                  nameOf(app.getGroup())
                });
      }
      return null;
    }
View Full Code Here

TOP

Related Classes of ise.mace.actions.ApplyToGroup

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.