View Javadoc

1   package cz.cuni.amis.pogamut.defcon.communication.commands;
2   
3   import cz.cuni.amis.pogamut.base.communication.command.ICommandSerializer;
4   import cz.cuni.amis.pogamut.base.communication.messages.CommandMessage;
5   import cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand;
6   
7   /**
8    * Executes a single defcon comamnd.
9    * 
10   * @author Radek 'Black_Hand' Pibil
11   * 
12   */
13  public class DefConCommandExecutor implements ICommandSerializer<DefConCommand> {
14  
15  	@Override
16  	public DefConCommand serialize(CommandMessage command) {
17  		DefConCommand dcCommand = (DefConCommand)command;
18  		dcCommand.perform();
19  		return dcCommand;
20  	}
21  }