public class ServiceRequestsClient extends Object
Constructor and Description |
---|
ServiceRequestsClient(com.sun.jersey.api.client.WebResource webResource) |
Modifier and Type | Method and Description |
---|---|
Long |
getPublishedService(String serviceName)
Retrieve the Published service with the given name.
|
String |
getPublishedServiceNameByPayload(String payload)
Retrieve the Published service name for the given payload
|
String |
getServiceRequestPayload(Long serviceID)
Retrieve the form required for a published service
|
Long |
requestService(String payload)
Request a new Service Request from vCommander passing in the payload.
|
List<DeployedComponentInfo> |
waitForServiceRequestToBeCompleted(Long requestId,
long timeout,
long polling,
PrintStream logger)
Waits until the service request is successfully deployed.
|
public ServiceRequestsClient(com.sun.jersey.api.client.WebResource webResource)
public Long getPublishedService(String serviceName) throws org.codehaus.jettison.json.JSONException, VCommanderException
serviceName
- The name of the published serviceorg.codehaus.jettison.json.JSONException
- If there is a syntax errorVCommanderException
- If something goes wrongpublic String getPublishedServiceNameByPayload(String payload) throws org.codehaus.jettison.json.JSONException, VCommanderException
payload
- The service request payloadorg.codehaus.jettison.json.JSONException
- If there is a syntax errorVCommanderException
- If something goes wrongpublic String getServiceRequestPayload(Long serviceID) throws org.codehaus.jettison.json.JSONException, VCommanderException
serviceID
- The published service IDorg.codehaus.jettison.json.JSONException
- If there is a syntax errorVCommanderException
- If something goes wrongpublic Long requestService(String payload) throws org.codehaus.jettison.json.JSONException, VCommanderException
payload
- The service request payloadorg.codehaus.jettison.json.JSONException
- If there is a syntax errorVCommanderException
- If something goes wrongpublic List<DeployedComponentInfo> waitForServiceRequestToBeCompleted(Long requestId, long timeout, long polling, PrintStream logger) throws org.codehaus.jettison.json.JSONException, InterruptedException, VCommanderException
requestId
- The service request idtimeout
- Timeout in minutespolling
- Polling interval in secondslogger
- A PrintStream, used for loggingorg.codehaus.jettison.json.JSONException
- If there is a syntax errorInterruptedException
- If the wait is interruptedVCommanderException
- If something goes wrongCopyright © 2016–2021. All rights reserved.