org.inria.myriads.snoozenode.executor
Class ShellCommandExecuter

java.lang.Object
  extended by org.inria.myriads.snoozenode.executor.ShellCommandExecuter
All Implemented Interfaces:
ExecutorListener

public final class ShellCommandExecuter
extends Object
implements ExecutorListener

Shell command executer.

Author:
Eugen Feller

Constructor Summary
ShellCommandExecuter(int timeout)
          Shell command executir.
 
Method Summary
 boolean execute(String command)
          Execute shell command.
 void onCommandExecuted(boolean result)
          Called upon command execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShellCommandExecuter

public ShellCommandExecuter(int timeout)
Shell command executir.

Parameters:
timeout - The timeout
Method Detail

execute

public boolean execute(String command)
Execute shell command.

Parameters:
command - The command to execute
Returns:
true if everything ok, false otherwise

onCommandExecuted

public void onCommandExecuted(boolean result)
Called upon command execution.

Specified by:
onCommandExecuted in interface ExecutorListener
Parameters:
result - The result


Copyright © 2012. All Rights Reserved.