Examples of PlayerCommand


Examples of org.flexunit.ant.launcher.commands.player.PlayerCommand

      {
         // setup daemon
         Future<Object> daemon = setupSocketThread();

         // run the execution context and player
         PlayerCommand player = obtainPlayer();
         ExecutionContext context = obtainContext(player);
        
         //start the execution context
         context.start();
        
         //launch the player
         Process process = player.launch();

         // block until daemon is completely done with all test data
         daemon.get();

         //stop the execution context now that socket thread is done
View Full Code Here

Examples of org.flexunit.ant.launcher.commands.player.PlayerCommand

    * @return PlayerCommand based on user config
    */
   protected PlayerCommand obtainPlayer()
   {
      // get command from factory
      PlayerCommand command = PlayerCommandFactory.createPlayer(
            configuration.getOs(),
            configuration.getPlayer(),
            configuration.getCommand(),
            configuration.isLocalTrusted());
     
      command.setProject(project);
      command.setSwf(configuration.getSwf());
      command.setUrl(configuration.getUrl());
     
      if(command instanceof AdlCommand)
      {
        ((AdlCommand)command).setPrecompiledAppDescriptor(configuration.getPrecompiledAppDescriptor());
      }
View Full Code Here

Examples of org.flexunit.ant.launcher.commands.player.PlayerCommand

      {
         // setup daemon
         Future<Object> daemon = setupSocketThread();

         // run the execution context and player
         PlayerCommand player = obtainPlayer();
         ExecutionContext context = obtainContext(player);
        
         //start the execution context
         context.start();
        
         //launch the player
         Process process = player.launch();

         // block until daemon is completely done with all test data
         daemon.get();

         //stop the execution context now that socket thread is done
View Full Code Here

Examples of org.flexunit.ant.launcher.commands.player.PlayerCommand

    * @return PlayerCommand based on user config
    */
   protected PlayerCommand obtainPlayer()
   {
      // get command from factory
      PlayerCommand command = PlayerCommandFactory.createPlayer(
            configuration.getOs(),
            configuration.getPlayer(),
            configuration.getCommand(),
            configuration.isLocalTrusted());
     
      command.setProject(project);
      command.setSwf(configuration.getSwf());
      command.setUrl(configuration.getUrl());
     
      if(command instanceof AdlCommand)
      {
        ((AdlCommand)command).setPrecompiledAppDescriptor(configuration.getPrecompiledAppDescriptor());
      }
View Full Code Here

Examples of simpleserver.command.PlayerCommand

    String commandName = message.split(" ")[0].substring(1).toLowerCase();
    String args = commandName.length() + 1 >= message.length() ? "" : message.substring(commandName.length() + 2);
    CommandConfig config = server.config.commands.getTopConfig(commandName);
    String originalName = config == null ? commandName : config.originalName;

    PlayerCommand command = server.resolvePlayerCommand(originalName, groupObject);

    if (config != null && !overridePermissions) {
      Permission permission = server.config.getCommandPermission(config.name, args, position.coordinate());
      if (!permission.contains(this)) {
        addTMessage(Color.RED, "Insufficient permission.");
        return null;
      }
    }

    try {
      if (server.options.getBoolean("enableEvents") && config.event != null) {
        Event e = server.eventhost.findEvent(config.event);
        if (e != null) {
          ArrayList<String> arguments = new ArrayList<String>();
          if (!args.equals("")) {
            arguments = new ArrayList<String>(java.util.Arrays.asList(args.split("\\s+")));
          }
          server.eventhost.execute(e, this, true, arguments);
        } else {
          System.out.println("Error in player command " + originalName + ": Event " + config.event + " not found!");
        }
      }
    } catch (NullPointerException e) {
      System.out.println("Error evaluating player command: " + originalName);
    }

    if (!(command instanceof ExternalCommand) && (config == null || config.forwarding != Forwarding.ONLY)) {
      command.execute(this, message);
    }

    if (command instanceof ExternalCommand) {
      // commands with bound events have to be forwarded explicitly
      // (to prevent unknown command error by server)
View Full Code Here

Examples of simpleserver.command.PlayerCommand

    // execute the server command, overriding the player permissions
    p.parseCommand(message, true);

    // handle forwarding
    String cmd = tokens.get(0);
    PlayerCommand command = server.resolvePlayerCommand(cmd, p.getGroup());

    // forwarding if necessary
    CommandConfig config = server.config.commands.getTopConfig(cmd);
    if ((command instanceof ExternalCommand)
        || (config != null && config.forwarding != Forwarding.NONE)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.