public class ServicesManagerImpl extends Object implements org.duracloud.serviceapi.ServicesManager, org.duracloud.common.model.Securable
Constructor and Description |
---|
ServicesManagerImpl(String host,
String port) |
ServicesManagerImpl(String host,
String port,
String context) |
Modifier and Type | Method and Description |
---|---|
int |
deployService(int serviceId,
String serviceHost,
String userConfigVersion,
List<org.duracloud.serviceconfig.user.UserConfigModeSet> userConfigModeSets)
Deploys a service.
|
List<org.duracloud.serviceconfig.ServiceInfo> |
getAvailableServices()
Provides a listing of available services, that is, services which
can be deployed.
|
String |
getBaseURL() |
org.duracloud.serviceconfig.ServiceInfo |
getDeployedService(int serviceId,
int deploymentId)
Gets a deployed service.
|
Map<String,String> |
getDeployedServiceProps(int serviceId,
int deploymentId)
Gets runtime properties for a deployed service.
|
List<org.duracloud.serviceconfig.ServiceInfo> |
getDeployedServices()
Provides a listing of all deployed services.
|
org.duracloud.serviceconfig.ServiceInfo |
getService(int serviceId)
Gets a service.
|
void |
login(org.duracloud.common.model.Credential credential) |
void |
logout() |
void |
undeployService(int serviceId,
int deploymentId)
UnDeploys a service.
|
void |
updateServiceConfig(int serviceId,
int deploymentId,
String userConfigVersion,
List<org.duracloud.serviceconfig.user.UserConfigModeSet> userConfigModeSets)
Updates the configuration of a deployed service.
|
public String getBaseURL()
public List<org.duracloud.serviceconfig.ServiceInfo> getAvailableServices() throws org.duracloud.serviceapi.error.ServicesException
getAvailableServices
in interface org.duracloud.serviceapi.ServicesManager
org.duracloud.serviceapi.error.ServicesException
- if available services cannot be retrievedpublic List<org.duracloud.serviceconfig.ServiceInfo> getDeployedServices() throws org.duracloud.serviceapi.error.ServicesException
getDeployedServices
in interface org.duracloud.serviceapi.ServicesManager
org.duracloud.serviceapi.error.ServicesException
- if deployed services cannot be retrievedpublic org.duracloud.serviceconfig.ServiceInfo getService(int serviceId) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
getService
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to retrieveorg.duracloud.serviceapi.error.NotFoundException
- if the service cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service cannot be retrievedpublic org.duracloud.serviceconfig.ServiceInfo getDeployedService(int serviceId, int deploymentId) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
getDeployedService
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to retrievedeploymentId
- the ID of the service deployment to retrieveorg.duracloud.serviceapi.error.NotFoundException
- if either the service or deployment cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service cannot be retrievedpublic Map<String,String> getDeployedServiceProps(int serviceId, int deploymentId) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
getDeployedServiceProps
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to retrievedeploymentId
- the ID of the service deployment to retrieveorg.duracloud.serviceapi.error.NotFoundException
- if either the service or deployment cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service properties cannot be retrievedpublic int deployService(int serviceId, String serviceHost, String userConfigVersion, List<org.duracloud.serviceconfig.user.UserConfigModeSet> userConfigModeSets) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
deployService
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to deployserviceHost
- the selected service hostuserConfigVersion
- the version of the user configurationuserConfigModeSets
- a list of user configuration optionsorg.duracloud.serviceapi.error.NotFoundException
- if the service cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service cannot be deployedpublic void updateServiceConfig(int serviceId, int deploymentId, String userConfigVersion, List<org.duracloud.serviceconfig.user.UserConfigModeSet> userConfigModeSets) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
updateServiceConfig
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to updatedeploymentId
- the ID of the service deployment to updateuserConfigVersion
- the version of the user configurationuserConfigModeSets
- updated user configuration optionsorg.duracloud.serviceapi.error.NotFoundException
- if either the service or deployment cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service configuration cannot be updatedpublic void undeployService(int serviceId, int deploymentId) throws org.duracloud.serviceapi.error.NotFoundException, org.duracloud.serviceapi.error.ServicesException
undeployService
in interface org.duracloud.serviceapi.ServicesManager
serviceId
- the ID of the service to undeploydeploymentId
- the ID of the service deployment to undeployorg.duracloud.serviceapi.error.NotFoundException
- if either the service or deployment cannot be foundorg.duracloud.serviceapi.error.ServicesException
- if the service cannot be undeployedpublic void login(org.duracloud.common.model.Credential credential)
login
in interface org.duracloud.common.model.Securable
public void logout()
logout
in interface org.duracloud.common.model.Securable
Copyright © 2009-2013 DuraSpace. All Rights Reserved.