|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectargos.deploy.ComponentManager
public class ComponentManager
ComponentManager is the control center for Argos, it handles deployment, redployment and stopping of services. Deployment of new service files is done by calling the public method deploy(). When this method is called it is assumed that the service is not running already. If the service is already running the loading of that service will fail. To redploy a service the method redeploy() is to be used.
Redeploy() will stop the services that are needed to be stopped including any depending services before it calls deploy() and brings those services up again.
Stopping is done in the public method stop(), it will stop the given services and all services that are dependant on the stopped services.
argos.deploy.HotDeployer is the class that will call these methods. It is however possible to call control the ComponentManager through JMX. For this the methods startService(String filename) and startService(String serviceName) has been added.
Field Summary | |
---|---|
static String |
COMPONENT_STOPPED
|
NotificationProxy |
proxy
NotifictionProxy used to send out events. |
static String |
SERVICE_FAILED
This constant is added to notifications when a service has failed loading. |
static String |
SERVICE_LOADING
This constant is added to notifications when a service is about to be loaded. |
static String |
SERVICE_STARTED
This constant is added to notifications when a service has started. |
static String |
SERVICE_STOPPED
This constant is added to notifications when the micro kernel has done everything it is suppose to do to stop the service. |
static String |
STOPPING_COMPONENT
|
static String |
STOPPING_SERVICE
|
Method Summary | |
---|---|
void |
deploy(List<File> files)
|
static ComponentManager |
getInstance()
Gets the singelton instance of this class |
MBeanNotificationInfo[] |
getNotificationInfo()
This method returns the types of notifications this object can broadcast |
void |
redeploy(List<File> files)
This method will redploy the given files by stopping all the files and then deploying them with the deploy method. |
void |
shutdown()
This method will stopp all services that has been deployed. |
boolean |
start(ServiceMetaInfo meta)
|
boolean |
startService(String name)
This method will start a service by filename. |
void |
stop(ComponentMetaInfo component)
|
List<File> |
stop(List<ServiceMetaInfo> services)
This methods stops the given services and the services that depends on them. |
void |
stop(ServiceMetaInfo service)
|
boolean |
stopService(String name)
This method will stop a service and only this service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SERVICE_STARTED
public static final String SERVICE_STOPPED
public static final String SERVICE_LOADING
public static final String SERVICE_FAILED
public static final String COMPONENT_STOPPED
public static final String STOPPING_COMPONENT
public static final String STOPPING_SERVICE
public NotificationProxy proxy
Method Detail |
---|
public void deploy(List<File> files)
public boolean start(ServiceMetaInfo meta)
public void redeploy(List<File> files)
files
- Files that will be redeployedpublic List<File> stop(List<ServiceMetaInfo> services)
metadatas
- The services meta information
public void stop(ServiceMetaInfo service)
public void stop(ComponentMetaInfo component)
public boolean stopService(String name)
name
- The name of the service that will be stopped
public boolean startService(String name)
name
- The filename
public void shutdown()
public MBeanNotificationInfo[] getNotificationInfo()
public static ComponentManager getInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |