1 package org.wamblee.system;
4 * A sub system represents a part of a system that required a
5 * number of services and provides a number of services.
7 public interface SubSystem {
10 * Gets the name of the subsystem.
11 * @return Subsystem name.
16 * Gets a description of the provided interfaces.
17 * @return Provided interfaces.
19 ServiceDescriptor[] getProvidedServices();
22 * Gets a description of the required interfaces.
23 * @return Required interfaces.
25 ServiceDescriptor[] getRequiredServices();
29 * Initialises the subsytem by starting all the services that
30 * it described as provided.
31 * @param aContext Unique name for the subsystem.
32 * @param aRegistry Registry of service to which the subsystem must register the services it
34 * @param aRequiredServices Running services from other
35 * subsystems that are required by this subsystem.
36 * @return Services that are running in the subsystem.
38 Service[] start(String aContext, ServiceRegistry aRegistry, Service[] aRequiredServices);
41 * Gets the list of running services in the subsystem.
43 * This method may only be called after the
44 * {@link #initialize(String, Service[])} has been called.
47 Service[] getRunningServices();