com.heroku.api.request.stack
Class StackMigrate

java.lang.Object
  extended by com.heroku.api.request.stack.StackMigrate
All Implemented Interfaces:
Request<String>

public class StackMigrate
extends Object
implements Request<String>

Author:
Naaman Newbold

Constructor Summary
StackMigrate(String appName, Heroku.Stack stack)
           
 
Method Summary
 String getBody()
          Value of the request body.
 String getEndpoint()
          Path and query parameters of a URL.
 Map<String,String> getHeaders()
          Map of request-specific HTTP headers.
 Http.Method getHttpMethod()
          HTTP method.
 String getResponse(byte[] bytes, int status)
          Response handler.
 Http.Accept getResponseType()
          HTTP Accept header.
 boolean hasBody()
          Whether or not the request has a body.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackMigrate

public StackMigrate(String appName,
                    Heroku.Stack stack)
Method Detail

getHttpMethod

public Http.Method getHttpMethod()
Description copied from interface: Request
HTTP method. e.g. GET, POST, PUT, DELETE

Specified by:
getHttpMethod in interface Request<String>
Returns:
The HTTP method used in the request.

getEndpoint

public String getEndpoint()
Description copied from interface: Request
Path and query parameters of a URL.

Specified by:
getEndpoint in interface Request<String>
Returns:
The path and query parameters as a String.

hasBody

public boolean hasBody()
Description copied from interface: Request
Whether or not the request has a body.

Specified by:
hasBody in interface Request<String>
Returns:
true if it has a request body, otherwise false

getBody

public String getBody()
Description copied from interface: Request
Value of the request body.

Specified by:
getBody in interface Request<String>
Returns:
Body

getResponseType

public Http.Accept getResponseType()
Description copied from interface: Request
HTTP Accept header.

Specified by:
getResponseType in interface Request<String>
Returns:
The Accept header to be used in the request. Typically "application/json" or "text/xml"
See Also:
Http.Accept

getHeaders

public Map<String,String> getHeaders()
Description copied from interface: Request
Map of request-specific HTTP headers.

Specified by:
getHeaders in interface Request<String>
Returns:
Name/value pairs of HTTP headers.

getResponse

public String getResponse(byte[] bytes,
                          int status)
Description copied from interface: Request
Response handler.

Specified by:
getResponse in interface Request<String>
Parameters:
bytes - Data returned from the request.
status - HTTP status code.
Returns:
The type T as specified by an individual request.


Copyright © 2012. All Rights Reserved.