org.dfdaemon.il2.core.console
Class AbstractCommandExecutor

java.lang.Object
  extended by org.dfdaemon.il2.core.console.AbstractCommandExecutor
All Implemented Interfaces:
CoreTask, CommandExecutor
Direct Known Subclasses:
TelnetCommandExecutor

public abstract class AbstractCommandExecutor
extends Object
implements CommandExecutor, CoreTask

Author:
aka50

Constructor Summary
AbstractCommandExecutor()
           
 
Method Summary
 void addCommandParser(Class cmdClz, CommandParser<?,? extends Command<?>> cmdPareser)
           
 void addLineFilter(LineFilter lineFilter)
           
protected  void doWork(Reader reader, Writer writer)
           
<C extends Command<R>,R>
R
executeCommand(C cmd)
           
protected abstract  boolean isInputValid()
           
protected abstract  boolean isTerminated()
           
 void setEventProcessor(EventProcessor eventProcessor)
           
 void setPollFreq(long pollFreq)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.dfdaemon.il2.core.task.CoreTask
afterRun, preRun, run
 

Constructor Detail

AbstractCommandExecutor

public AbstractCommandExecutor()
Method Detail

isTerminated

protected abstract boolean isTerminated()

isInputValid

protected abstract boolean isInputValid()

executeCommand

public <C extends Command<R>,R> R executeCommand(C cmd)
                 throws InterruptedException
Specified by:
executeCommand in interface CommandExecutor
Throws:
InterruptedException

doWork

protected void doWork(Reader reader,
                      Writer writer)
               throws Exception
Throws:
Exception

setEventProcessor

public void setEventProcessor(EventProcessor eventProcessor)

setPollFreq

public void setPollFreq(long pollFreq)

addLineFilter

public void addLineFilter(LineFilter lineFilter)
Specified by:
addLineFilter in interface CommandExecutor

addCommandParser

public void addCommandParser(Class cmdClz,
                             CommandParser<?,? extends Command<?>> cmdPareser)
Specified by:
addCommandParser in interface CommandExecutor


Copyright © 2007-2008. All Rights Reserved.