| 1 | |
package br.org.agilcoop.cursos.testes.unidade.timer.eventos; |
| 2 | |
|
| 3 | |
import java.io.IOException; |
| 4 | |
import br.org.agilcoop.cursos.testes.unidade.timer.Event; |
| 5 | |
import br.org.agilcoop.cursos.testes.unidade.timer.Timer; |
| 6 | |
|
| 7 | 0 | public abstract class SOCommandLineEvent implements Event { |
| 8 | |
|
| 9 | |
public void executa(final Timer timer) { |
| 10 | |
try { |
| 11 | 0 | Runtime.getRuntime().exec(getCommand(timer)); |
| 12 | 0 | } catch (IOException e) { |
| 13 | 0 | e.printStackTrace(); |
| 14 | |
} |
| 15 | 0 | } |
| 16 | |
|
| 17 | |
public abstract String getCommand(Timer timer); |
| 18 | |
|
| 19 | |
} |