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 |
bindApplication(String applicationName,
String boundTplName,
String boundApp)
Binds an application for external exports.
|
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> |
findComponentAncestors(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> |
findComponentChildren(String applicationName,
String componentName)
Finds the component names you could instantiate and deploy on an existing instance.
|
List<String> |
listAllCommands(String applicationName)
Lists application commands.
|
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 |
removeInstance(String applicationName,
String instancePath)
Removes an instance.
|
void |
resynchronize(String applicationName)
Resynchronizes all the instances / agents.
|
void |
setDescription(String applicationName,
String newDesc)
Changes the description of an application.
|
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 ApplicationWsException
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)ApplicationWsException - if something went wrongpublic void setDescription(String applicationName, String newDesc) throws ApplicationWsException
applicationName - the application namenewDesc - the new description to setApplicationWsException - if something went wrongpublic void deployAndStartAll(String applicationName, String instancePath) throws ApplicationWsException
applicationName - the application nameinstancePath - the instance path (null for all the application instances)ApplicationWsException - if something went wrongpublic void stopAll(String applicationName, String instancePath) throws ApplicationWsException
applicationName - the application nameinstancePath - the path of the instance to stop (null for all the application instances)ApplicationWsException - if something went wrongpublic void undeployAll(String applicationName, String instancePath) throws ApplicationWsException
applicationName - the application nameinstancePath - the path of the instance to undeploy (null for all the application instances)ApplicationWsException - 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 ApplicationWsException
applicationName - the application nameparentInstancePath - the path of the parent instance (null to create a root instance)instance - the instance to addApplicationWsException - if a problem occurred with the instance managementpublic void removeInstance(String applicationName, String instancePath)
applicationName - the application nameinstancePath - the path of the instance to removepublic void resynchronize(String applicationName)
applicationName - the application namepublic List<net.roboconf.core.model.beans.Component> listAllComponents(String applicationName)
applicationName - the application namepublic List<net.roboconf.core.model.beans.Component> findComponentChildren(String applicationName, String componentName)
applicationName - the application namecomponentName - a component name (null to get root components)public List<net.roboconf.core.model.beans.Component> findComponentAncestors(String applicationName, String componentName)
applicationName - the application namecomponentName - a component namepublic void bindApplication(String applicationName, String boundTplName, String boundApp) throws ApplicationWsException
applicationName - the application nameboundTplName - the template name (no qualifier as it does not make sense for external exports)boundApp - the name of the application (instance of tplName)ApplicationWsException - if something went wrongCopyright © 2017. All rights reserved.