public class ApplicationWsDelegate extends Object
| Constructor and Description |
|---|
ApplicationWsDelegate(com.sun.jersey.api.client.WebResource resource)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(String applicationName,
String parentInstancePath,
net.roboconf.core.model.beans.Instance instance)
Adds an instance into an application.
|
void |
changeInstanceState(String applicationName,
net.roboconf.core.model.beans.Instance.InstanceStatus newStatus,
String instancePath)
Changes the state of an instance.
|
void |
deployAndStartAll(String applicationName,
String instancePath)
Deploys and starts several instances at once.
|
List<net.roboconf.core.model.beans.Component> |
findPossibleComponentChildren(String applicationName,
String instancePath)
Finds the component names you could instantiate and deploy on an existing instance.
|
List<String> |
findPossibleParentInstances(String applicationName,
String componentName)
Finds the instances on which you could deploy a new instance of a component.
|
List<net.roboconf.core.model.beans.Component> |
listAllComponents(String applicationName)
Lists all the components from a given application.
|
List<net.roboconf.core.model.beans.Instance> |
listChildrenInstances(String applicationName,
String instancePath,
boolean all)
Lists all the children of an instance.
|
void |
stopAll(String applicationName,
String instancePath)
Stops several instances at once.
|
void |
undeployAll(String applicationName,
String instancePath)
Undeploys several instances at once.
|
public ApplicationWsDelegate(com.sun.jersey.api.client.WebResource resource)
resource - a web resourcepublic void changeInstanceState(String applicationName, net.roboconf.core.model.beans.Instance.InstanceStatus newStatus, String instancePath) throws ApplicationException
Notice that these actions, like of most of the others, are performed asynchronously. It means invoking these REST operations is equivalent to submitting a request. How it will be processed concretely will depend then on the agent.
applicationName - the application namenewStatus - the new state of the instanceinstancePath - the instance path (not null)ApplicationException - if something went wrongpublic void deployAndStartAll(String applicationName, String instancePath) throws ApplicationException
applicationName - the application nameinstancePath - the instance path (null for all the application instances)ApplicationException - if something went wrongpublic void stopAll(String applicationName, String instancePath) throws ApplicationException
applicationName - the application nameinstancePath - the path of the instance to stop (null for all the application instances)ApplicationException - if something went wrongpublic void undeployAll(String applicationName, String instancePath) throws ApplicationException
applicationName - the application nameinstancePath - the path of the instance to undeploy (null for all the application instances)ApplicationException - if something went wrongpublic List<net.roboconf.core.model.beans.Instance> listChildrenInstances(String applicationName, String instancePath, boolean all)
applicationName - the application nameinstancePath - the instance path (null to get root instances)all - true to list indirect children too, false to only list direct childrenpublic void addInstance(String applicationName, String parentInstancePath, net.roboconf.core.model.beans.Instance instance) throws ApplicationException
applicationName - the application nameparentInstancePath - the path of the parent instance (null to create a root instance)instance - the instance to addApplicationException - if a problem occurred with the instance managementpublic List<net.roboconf.core.model.beans.Component> listAllComponents(String applicationName)
applicationName - the application namepublic List<net.roboconf.core.model.beans.Component> findPossibleComponentChildren(String applicationName, String instancePath)
applicationName - the application nameinstancePath - an instance path (null to get root components)public List<String> findPossibleParentInstances(String applicationName, String componentName)
applicationName - the application namecomponentName - a component nameCopyright © 2015. All rights reserved.