solar.service.fork
Class SolarForkService
java.lang.Object
|
+--solar.service.BaseService
|
+--solar.service.fork.SolarForkService
- All Implemented Interfaces:
- EventHandler, ForkService, RequestHandler, RpcConstants, Service, TaskBatch.BatchListener
- public class SolarForkService
- extends BaseService
- implements ForkService, TaskBatch.BatchListener, RpcConstants
An implementation of forking service. It reads a configuration file
and sends requests to fork services on other hosts.
- Version:
- $Id: SolarForkService.java,v 1.3 2003/10/08 22:53:22 glchen Exp $
- Author:
- Guanling Chen
Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, hasInited, init, setInited, setName, setServiceManager, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_log
protected static org.apache.log4j.Logger _log
_forkName
protected java.lang.String _forkName
_transportName
protected java.lang.String _transportName
_transportAddress
protected Address _transportAddress
_rpc
protected RpcService _rpc
_dispatch
protected DispatchService _dispatch
_batch
protected TaskBatch _batch
_timer
protected java.util.Timer _timer
_process
protected java.util.Hashtable _process
SolarForkService
public SolarForkService()
init
public void init()
throws ServiceException
- Description copied from interface:
Service
- Initiate the service, do not try to init dependent services here.
- Specified by:
init
in interface Service
- Overrides:
init
in class BaseService
ServiceException
initDependents
public void initDependents()
throws ServiceException
- Description copied from interface:
Service
- Initialize dependent services here.
- Specified by:
initDependents
in interface Service
- Overrides:
initDependents
in class BaseService
ServiceException
handleEvent
public void handleEvent(Event evt)
- Description copied from interface:
EventHandler
- Processing an event.
- Specified by:
handleEvent
in interface EventHandler
- Overrides:
handleEvent
in class BaseService
handleRequest
public java.lang.Object handleRequest(Request request)
throws java.lang.Exception
- Description copied from interface:
RequestHandler
- Processing a request.
- Specified by:
handleRequest
in interface RequestHandler
- Overrides:
handleRequest
in class BaseService
java.lang.Exception
start
public void start(Id id,
Address dest,
java.lang.String cmd)
throws ForkException
- Description copied from interface:
ForkService
- Execute a command on specified address.
- Specified by:
start
in interface ForkService
ForkException
destroy
public void destroy(Id id,
Address dest)
throws ForkException
- Description copied from interface:
ForkService
- Execute a previously created process at specified address.
- Specified by:
destroy
in interface ForkService
ForkException
batchrun
public void batchrun(java.lang.String taskfile)
throws ForkException
- Specified by:
batchrun
in interface ForkService
ForkException
startTask
public void startTask(Task task)
throws java.lang.Exception
- Specified by:
startTask
in interface TaskBatch.BatchListener
java.lang.Exception
batchFinished
public void batchFinished()
- Specified by:
batchFinished
in interface TaskBatch.BatchListener