autohit.server.service
Class CLIService

java.lang.Object
  extended byautohit.vm.VM
      extended byautohit.server.service.Service
          extended byautohit.server.service.CLIService

public class CLIService
extends Service

This as an interactive, STDIO based CLI. We'll use the AutohitLogManager for targets and responses. There can be only one instance of this service, since it hsa a unique injector.

The command channel (autohit.command) must be built before creating one of these!!!! CommandService will do that for you.

Version:
1.0 Version HistoryEPG - Initial - 19SEP03
Author:
Erich P. Gatejen

Field Summary
static java.lang.String INJECTOR_NAME
           
 
Fields inherited from class autohit.server.service.Service
sc
 
Fields inherited from class autohit.vm.VM
buf, core, errors, faults, ip, left, loader, myLog, process, right, rinjector, rootProgram, sname, state, STATE_ACTIVE_THRESHOLD, STATE_BUILDING, STATE_DONE, STATE_INVALID, STATE_NEW, STATE_NO_VM, STATE_PAUSED, STATE_RUNNING, TIME_GRAN
 
Constructor Summary
CLIService()
          Default constructor
 
Method Summary
 void construct()
          Complete construction.
 void destruct()
          Complete destroy.
 void execute()
          Fast loop.
 
Methods inherited from class autohit.server.service.Service
loadcontext
 
Methods inherited from class autohit.vm.VM
attach, die, finalize, getState, init, pause, prepare, resume, setParentCore, start, ticks
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INJECTOR_NAME

public static final java.lang.String INJECTOR_NAME
See Also:
Constant Field Values
Constructor Detail

CLIService

public CLIService()
Default constructor

Method Detail

construct

public void construct()
               throws ServiceException
Complete construction. This will be called when the VM is initialized.

Specified by:
construct in class VM
Throws:
ServiceException

execute

public void execute()
             throws ServiceException
Fast loop. We spend most of our time waiting for connections. Cycle back to VM only after an accept or a timeout.

Specified by:
execute in class VM
Throws:
ServiceException
See Also:
VMException

destruct

public void destruct()
              throws ServiceException
Complete destroy. This will be called when the VM is finalizing.

Specified by:
destruct in class VM
Throws:
ServiceException


Test.