X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2FSubSystem.java;h=4e79ed76830f6eb1e625b1dfd0ec5e662d0330e2;hb=42515fd88bee97ebb3a3180fdcb320faf5fa1d91;hp=babb9e025edbd7ce2e15bdeb114e576451b19aaf;hpb=47219ea21e66b5414eeb8b85049a2caa62e3547e;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/SubSystem.java b/system/general/src/main/java/org/wamblee/system/SubSystem.java index babb9e02..4e79ed76 100644 --- a/system/general/src/main/java/org/wamblee/system/SubSystem.java +++ b/system/general/src/main/java/org/wamblee/system/SubSystem.java @@ -3,6 +3,8 @@ package org.wamblee.system; /** * A sub system represents a part of a system that required a * number of services and provides a number of services. + * + * @author Erik Brakkee */ public interface SubSystem { @@ -16,26 +18,29 @@ public interface SubSystem { * Gets a description of the provided interfaces. * @return Provided interfaces. */ - ServiceDescriptor[] getProvidedServices(); + ProvidedServiceDescriptor[] getProvidedServices(); /** * Gets a description of the required interfaces. * @return Required interfaces. */ - ServiceDescriptor[] getRequiredServices(); + RequiredServiceDescriptor[] getRequiredServices(); /** * Initialises the subsytem by starting all the services that * it described as provided. * @param aContext Unique name for the subsystem. - * @param aRegistry Registry of service to which the subsystem must register the services it - * creates. * @param aRequiredServices Running services from other * subsystems that are required by this subsystem. * @return Services that are running in the subsystem. */ - Service[] start(String aContext, ServiceRegistry aRegistry, Service[] aRequiredServices); + Service[] start(String aContext, Service[] aRequiredServices); + + /** + * Stops a subsystem. + */ + void stop(); /** * Gets the list of running services in the subsystem.