Interface SvcStartup
In order to get a Service acting in correspondence to a
ServiceDescription, you will have to implement the
SvcStartup
interface.
It is defined in
src/idl/DWARF/Service.idl
.
It provides two methods:
startService
:
- This one is called by the ServiceManager, when the Service's functionality is required, say when another Service requires data from a need of this Service.
- The ServiceDescription is given in this method call, so that the service can configure to the network structure as required for the application.
- The
startService
method can only get called, if there is a ServiceDescription and when the Service is running (in general as a process) and is registered at the ServiceManager (The Service process has to get the ServiceManager via CorbaInit and has to call regsiterService
on the ServiceManager).
- For every need and ability, you must register a object at the ServiceManager (
registerAbility
, registerNeed
), that is capable of handling the connector that is specified in the corresponding need/ability.
stopService
:
- If the functionality of teh Service is no longer required, the ServiceManager calls
stopService
. The Service should clean up to a state as before calling startService
, so that startService
can be called again, when the Service's functionality is required again.
The interfaces
Service
and
SvcService
are aggregated in the
BasicService
interface (also see
src/idl/DWARF/Service.idl
) to avoid problems of programming languages that do not support multiple inheritance. The
TemplateService
(
CPP,
Java) implements the
BasicService
interface.
--
MarcusToennis - 13 Feb 2006