X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2FComponent.java;h=4083c5bd6fc9e28f2e4b04e096e659d06b5d0d9b;hb=2aa6c38d06e981a4a6c240e2d371638205c3fb54;hp=6a31e01d61748002d63a435ac0da55f56ca66733;hpb=6f277575685808a5c5a76555dd3e839dc5255031;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/Component.java b/system/general/src/main/java/org/wamblee/system/Component.java index 6a31e01d..4083c5bd 100644 --- a/system/general/src/main/java/org/wamblee/system/Component.java +++ b/system/general/src/main/java/org/wamblee/system/Component.java @@ -8,6 +8,16 @@ package org.wamblee.system; */ public interface Component { + enum Status { + NOT_STARTED, RUNNING, STOPPED + } + + /** + * Gets the status of the component. + * @return Status. + */ + Status getStatus(); + /** * Gets the name of the subsystem. * @return Subsystem name. @@ -18,24 +28,21 @@ public interface Component { * Gets a description of the provided interfaces. * @return Provided interfaces. */ - ProvidedInterfaceDescriptor[] getProvidedServices(); + ProvidedInterface[] getProvidedServices(); /** * Gets a description of the required interfaces. * @return Required interfaces. */ - RequiredInterfaceDescriptor[] getRequiredServices(); + RequiredInterface[] getRequiredServices(); /** * Initialises the subsytem by starting all the services that * it described as provided. - * @param aContext Unique name for the subsystem. - * @param aRequiredServices Running services from other - * subsystems that are required by this subsystem. - * @return Services that are running in the subsystem. + * @param aContext Unique name for the subsystem. */ - Service[] start(String aContext, Service[] aRequiredServices); + void start(String aContext); /** * Stops a subsystem. @@ -49,5 +56,5 @@ public interface Component { * {@link #initialize(String, Service[])} has been called. * @return */ - Service[] getRunningServices(); + ProvidedInterface[] getRunningServices(); }