com.heroku.api.request.stack
Class StackList

java.lang.Object
  extended by com.heroku.api.request.stack.StackList
All Implemented Interfaces:
Request<List<StackInfo>>

public class StackList
extends Object
implements Request<List<StackInfo>>

Author:
Naaman Newbold

Constructor Summary
StackList(String appName)
           
 
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.
 List<StackInfo> 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

StackList

public StackList(String appName)
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<List<StackInfo>>
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<List<StackInfo>>
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<List<StackInfo>>
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<List<StackInfo>>
Returns:
Body

getResponseType

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

Specified by:
getResponseType in interface Request<List<StackInfo>>
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<List<StackInfo>>
Returns:
Name/value pairs of HTTP headers.

getResponse

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

Specified by:
getResponse in interface Request<List<StackInfo>>
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.