1 package org.wamblee.system;
4 * A component represents a part of a system that requires a
5 * number of interfaces and provides a number of interfaces.
9 public interface Component {
12 NOT_STARTED, RUNNING, STOPPED
16 * Gets the status of the component.
22 * Gets the name of the subsystem.
23 * @return Subsystem name.
28 * Gets a description of the provided interfaces.
29 * @return Provided interfaces.
31 ProvidedInterfaceDescriptor[] getProvidedServices();
34 * Gets a description of the required interfaces.
35 * @return Required interfaces.
37 RequiredInterfaceDescriptor[] getRequiredServices();
41 * Initialises the subsytem by starting all the services that
42 * it described as provided.
43 * @param aContext Unique name for the subsystem.
44 * @param aRequiredServices Running services from other
45 * subsystems that are required by this subsystem.
46 * @return Services that are running in the subsystem.
48 Service[] start(String aContext, Service[] aRequiredServices);
56 * Gets the list of running services in the subsystem.
58 * This method may only be called after the
59 * {@link #initialize(String, Service[])} has been called.
62 Service[] getRunningServices();