com.heroku.api.request
Class RequestConfig

java.lang.Object
  extended by com.heroku.api.request.RequestConfig

public class RequestConfig
extends Object

Wrapper class for an EnumMap to configure a Request. A Heroku.RequestKey serves as a predetermined key for a name/value parameter.

Author:
Naaman Newbold

Constructor Summary
RequestConfig()
           
 
Method Summary
 RequestConfig app(String appName)
          Sets the Heroku.RequestKey.AppName parameter.
 Map<Heroku.RequestKey,String> asMap()
           
 String get(Heroku.RequestKey key)
           
 boolean has(Heroku.RequestKey key)
           
 RequestConfig onStack(Heroku.Stack stack)
          Sets the Heroku.RequestKey.Stack parameter.
 RequestConfig with(Heroku.RequestKey key, String value)
          Sets a Heroku.RequestKey parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestConfig

public RequestConfig()
Method Detail

onStack

public RequestConfig onStack(Heroku.Stack stack)
Sets the Heroku.RequestKey.Stack parameter.

Parameters:
stack - A Heroku.Stack to specify in the config.
Returns:
A new RequestConfig

app

public RequestConfig app(String appName)
Sets the Heroku.RequestKey.AppName parameter.

Parameters:
appName - Name of the app to specify in the config.
Returns:
A new RequestConfig

with

public RequestConfig with(Heroku.RequestKey key,
                          String value)
Sets a Heroku.RequestKey parameter.

Parameters:
key -
value -
Returns:
A new RequestConfig

get

public String get(Heroku.RequestKey key)

asMap

public Map<Heroku.RequestKey,String> asMap()

has

public boolean has(Heroku.RequestKey key)


Copyright © 2012. All Rights Reserved.