Next: , Previous: , Up: Services   [Contents][Index]

4.2 Methods of services

method: start (obj <service>)

Start the service obj, including all the services it depends on. It tries quite hard to do this: When a service that provides a required symbol can not be started, it will look for another service that also provides this symbol, until starting one such service succeeds. There is some room for theoretical improvement here, of course, but in pratice the current strategy already works very well. This method returns the new value of the running slot Slots of services, which is #f if the service could not be started.

method: stop (obj <service>)

This will stop the service obj, trying to stop services that depend in it first, so they can be shutdown cleanly. If this will fail, it will continue anyway. Stopping of services should usually succeed, though. Otherwise, the behaviour is very similar to the start method. The return value is also the new running value, thus #f if the service was stopped.

method: action (obj <service>) the-action . args

Calls the action the-action (a symbol) of the service obj, with the specified args, which have a meaning depending on the particular action.

method: conflicts-with (obj <service>)

Returns a list of the canonical names of services that conflict with the service obj.

method: canonical-name (obj <service>)

Returns the canonical name of obj, which is the first element of the provides list.

method: provided-by (obj <service>)

Returns which symbols are provided by obj.

method: required-by (obj <service>)

Returns which symbols are required by obj.

method: running? (obj <service>)

Returns whether the service obj is running.

method: respawn? (obj <service>)

Returns whether the service obj should be respawned if it terminates.

method: default-display-status (obj <service>)

Display status information about obj. This method is called when the user performs the action status on obj, but there is no specific implementation given for it. It is also called when detailed-status is applied on dmd.

Next: , Previous: , Up: Services   [Contents][Index]