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.
9 public interface SubSystem {
12 * Gets the name of the subsystem.
13 * @return Subsystem name.
18 * Gets a description of the provided interfaces.
19 * @return Provided interfaces.
21 ProvidedServiceDescriptor[] getProvidedServices();
24 * Gets a description of the required interfaces.
25 * @return Required interfaces.
27 RequiredServiceDescriptor[] getRequiredServices();
31 * Initialises the subsytem by starting all the services that
32 * it described as provided.
33 * @param aContext Unique name for the subsystem.
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, Service[] aRequiredServices);
46 * Gets the list of running services in the subsystem.
48 * This method may only be called after the
49 * {@link #initialize(String, Service[])} has been called.
52 Service[] getRunningServices();