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 ProvidedInterface[] getProvidedServices();
34 * Gets a description of the required interfaces.
35 * @return Required interfaces.
37 RequiredInterface[] getRequiredServices();
41 * Initialises the subsytem by starting all the services that
42 * it described as provided.
43 * @param aContext Unique name for the subsystem.
45 void start(String aContext);
53 * Gets the list of running services in the subsystem.
55 * This method may only be called after the
56 * {@link #initialize(String, Service[])} has been called.
59 ProvidedInterface[] getRunningServices();