com.vmware.vcloud.sdk
Class Response

java.lang.Object
  extended by com.vmware.vcloud.sdk.Response

public class Response
extends Object

Helper class for the RestUtil.


Constructor Summary
Response()
           
 
Method Summary
<T> T
getResource()
          Unmarshalls the response
 void handleUnExpectedResponse()
          This method should be used if un-expected HTTP response is received.
 boolean isExpected(int expectedStatusCode)
          Checks for expected return HTTP status code
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response()
Method Detail

isExpected

public boolean isExpected(int expectedStatusCode)
Checks for expected return HTTP status code

Parameters:
expectedStatusCode -

getResource

public <T> T getResource()
              throws VCloudException
Unmarshalls the response

Throws:
VCloudException

handleUnExpectedResponse

public void handleUnExpectedResponse()
                              throws VCloudException
This method should be used if un-expected HTTP response is received. In such case it will try to get the ErrorType out of the Response and throw the VCloudException.

Throws:
VCloudException


Copyright © 2016. All Rights Reserved.