org.codegist.crest
Interface CRestProperty


public interface CRestProperty

Properties of this interface are meant to be used as keys in the custom properties map of CRestContext.

Author:
Laurent Gilles (laurent.gilles@codegist.org)
See Also:
CRestBuilder.setProperties(java.util.Map), CRestBuilder.setProperty(String, Object), CRestBuilder.addProperties(java.util.Map), InterfaceContext.getProperties()

Field Summary
static String CONFIG_INTERFACE_DEFAULT_CONTEXT_PATH
          override the default path InterfaceConfig.DEFAULT_CONTEXT_PATH.
static String CONFIG_INTERFACE_DEFAULT_ENCODING
          override the default encoding InterfaceConfig.DEFAULT_ENCODING.
static String CONFIG_INTERFACE_DEFAULT_GLOBAL_INTERCEPTOR
          override the default global request interceptor InterfaceConfig.DEFAULT_GLOBAL_INTERCEPTOR.
static String CONFIG_METHOD_DEFAULT_CO_TIMEOUT
          override the default connection timeout MethodConfig.DEFAULT_CO_TIMEOUT.
static String CONFIG_METHOD_DEFAULT_ERROR_HANDLER
          override the default error handler MethodConfig.DEFAULT_ERROR_HANDLER.
static String CONFIG_METHOD_DEFAULT_HTTP_METHOD
          override the default http method MethodConfig.DEFAULT_HTTP_METHOD.
static String CONFIG_METHOD_DEFAULT_PARAMS
          override the default method params MethodConfig.DEFAULT_PARAMS.
static String CONFIG_METHOD_DEFAULT_PATH
          override the default url fragment MethodConfig.DEFAULT_PATH.
static String CONFIG_METHOD_DEFAULT_REQUEST_INTERCEPTOR
          override the default request interceptor MethodConfig.DEFAULT_REQUEST_INTERCEPTOR.
static String CONFIG_METHOD_DEFAULT_RESPONSE_HANDLER
          override the default response handler MethodConfig.DEFAULT_RESPONSE_HANDLER.
static String CONFIG_METHOD_DEFAULT_RETRY_HANDLER
          override the default method retry handler MethodConfig.DEFAULT_RETRY_HANDLER.
static String CONFIG_METHOD_DEFAULT_SO_TIMEOUT
          override the default socket timeout MethodConfig.DEFAULT_SO_TIMEOUT.
static String CONFIG_PARAM_DEFAULT_DESTINATION
          override the default destination ParamConfig.DEFAULT_DESTINATION.
static String CONFIG_PARAM_DEFAULT_INJECTOR
          override the default injector ParamConfig.DEFAULT_INJECTOR.
static String CONFIG_PARAM_DEFAULT_NAME
          override the default name ParamConfig.DEFAULT_NAME.
static String CONFIG_PARAM_DEFAULT_SERIALIZER
          override the default serializer ParamConfig.DEFAULT_SERIALIZER.
static String HANDLER_RETRY_MAX_ATTEMPTS
          override the default max retry count MaxAttemptRetryHandler.DEFAULT_MAX.
static String OAUTH_ACCESS_TOKEN
          specify the preconfigured access token key.
static String OAUTH_ACCESS_TOKEN_EXTRAS
          specify the preconfigured access token extras.
static String OAUTH_ACCESS_TOKEN_REFRESH_URL
          specify the access token refresh url that gets called when the preconfigure access token is expired.
static String OAUTH_ACCESS_TOKEN_SECRET
          specify the preconfigured access token secret.
static String OAUTH_CONSUMER_KEY
          specify the preconfigured consumer key.
static String OAUTH_CONSUMER_SECRET
          specify the preconfigured consumer secret.
static String OAUTH_PARAM_DEST
          specify where should the authentification parameter be added in the request, either in the URL or in the headers.
static String OAUTH_TOKEN_ACCESS_REFRESH_URL_METHOD
          specify the access token refresh url http method.
static String SERIALIZER_BOOLEAN_FALSE
          override the default boolean FALSE value ("false").
static String SERIALIZER_BOOLEAN_TRUE
          override the default boolean TRUE value ("true").
static String SERIALIZER_CUSTOM_SERIALIZER_MAP
          specify a type/serializer map to use for selection of serializer to apply for any given type
static String SERIALIZER_DATE_FORMAT
          format the date with the given date format.
static String SERIALIZER_LIST_SEPARATOR
          override the default item separator (comma).
 

Field Detail

SERIALIZER_DATE_FORMAT

static final String SERIALIZER_DATE_FORMAT
format the date with the given date format.

Expects a String value of the following : Millis, Second, Minutes, Hours or Days to get the date as millisecond during from January 1, 1970, 00:00:00 GMT to this date or any DateFormat valid date format.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

SERIALIZER_LIST_SEPARATOR

static final String SERIALIZER_LIST_SEPARATOR
override the default item separator (comma).

Expects a String.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

SERIALIZER_BOOLEAN_TRUE

static final String SERIALIZER_BOOLEAN_TRUE
override the default boolean TRUE value ("true").

Expects a String.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

SERIALIZER_BOOLEAN_FALSE

static final String SERIALIZER_BOOLEAN_FALSE
override the default boolean FALSE value ("false").

Expects a String.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

SERIALIZER_CUSTOM_SERIALIZER_MAP

static final String SERIALIZER_CUSTOM_SERIALIZER_MAP
specify a type/serializer map to use for selection of serializer to apply for any given type

Expects an instance of Map<Type,Serializer>.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

OAUTH_PARAM_DEST

static final String OAUTH_PARAM_DEST
specify where should the authentification parameter be added in the request, either in the URL or in the headers.

Expects a String value, either equals to URL or HEADER.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_CONSUMER_SECRET

static final String OAUTH_CONSUMER_SECRET
specify the preconfigured consumer secret.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_CONSUMER_KEY

static final String OAUTH_CONSUMER_KEY
specify the preconfigured consumer key.

Expects a string value.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_ACCESS_TOKEN

static final String OAUTH_ACCESS_TOKEN
specify the preconfigured access token key.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_ACCESS_TOKEN_SECRET

static final String OAUTH_ACCESS_TOKEN_SECRET
specify the preconfigured access token secret.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_ACCESS_TOKEN_EXTRAS

static final String OAUTH_ACCESS_TOKEN_EXTRAS
specify the preconfigured access token extras.

Expects a java.lang.Map<java.lang.String,java.lang.String>.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_ACCESS_TOKEN_REFRESH_URL

static final String OAUTH_ACCESS_TOKEN_REFRESH_URL
specify the access token refresh url that gets called when the preconfigure access token is expired.

Expects a String.

See Also:
InterfaceContext.getProperties(), Constant Field Values

OAUTH_TOKEN_ACCESS_REFRESH_URL_METHOD

static final String OAUTH_TOKEN_ACCESS_REFRESH_URL_METHOD
specify the access token refresh url http method.

Default to POST

Expects a String.

See Also:
InterfaceContext.getProperties(), Constant Field Values

HANDLER_RETRY_MAX_ATTEMPTS

static final String HANDLER_RETRY_MAX_ATTEMPTS
override the default max retry count MaxAttemptRetryHandler.DEFAULT_MAX.

See Also:
Constant Field Values

CONFIG_INTERFACE_DEFAULT_ENCODING

static final String CONFIG_INTERFACE_DEFAULT_ENCODING
override the default encoding InterfaceConfig.DEFAULT_ENCODING.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_INTERFACE_DEFAULT_CONTEXT_PATH

static final String CONFIG_INTERFACE_DEFAULT_CONTEXT_PATH
override the default path InterfaceConfig.DEFAULT_CONTEXT_PATH.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_INTERFACE_DEFAULT_GLOBAL_INTERCEPTOR

static final String CONFIG_INTERFACE_DEFAULT_GLOBAL_INTERCEPTOR
override the default global request interceptor InterfaceConfig.DEFAULT_GLOBAL_INTERCEPTOR.

Expects an instance of RequestInterceptor.

See Also:
RequestInterceptor, InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_SO_TIMEOUT

static final String CONFIG_METHOD_DEFAULT_SO_TIMEOUT
override the default socket timeout MethodConfig.DEFAULT_SO_TIMEOUT.

Expects milliseconds (long).

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_CO_TIMEOUT

static final String CONFIG_METHOD_DEFAULT_CO_TIMEOUT
override the default connection timeout MethodConfig.DEFAULT_CO_TIMEOUT.

Expects milliseconds (long).

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_PATH

static final String CONFIG_METHOD_DEFAULT_PATH
override the default url fragment MethodConfig.DEFAULT_PATH.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_HTTP_METHOD

static final String CONFIG_METHOD_DEFAULT_HTTP_METHOD
override the default http method MethodConfig.DEFAULT_HTTP_METHOD.

Expects a member of HttpMethod.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_PARAMS

static final String CONFIG_METHOD_DEFAULT_PARAMS
override the default method params MethodConfig.DEFAULT_PARAMS.

Expects an array of StaticParam

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_RESPONSE_HANDLER

static final String CONFIG_METHOD_DEFAULT_RESPONSE_HANDLER
override the default response handler MethodConfig.DEFAULT_RESPONSE_HANDLER.

Expects an instance of ResponseHandler.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_ERROR_HANDLER

static final String CONFIG_METHOD_DEFAULT_ERROR_HANDLER
override the default error handler MethodConfig.DEFAULT_ERROR_HANDLER.

Expects an instance of ErrorHandler.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_REQUEST_INTERCEPTOR

static final String CONFIG_METHOD_DEFAULT_REQUEST_INTERCEPTOR
override the default request interceptor MethodConfig.DEFAULT_REQUEST_INTERCEPTOR.

Expects an instance of RequestInterceptor.

See Also:
InterfaceContext.getProperties(), Constant Field Values

CONFIG_METHOD_DEFAULT_RETRY_HANDLER

static final String CONFIG_METHOD_DEFAULT_RETRY_HANDLER
override the default method retry handler MethodConfig.DEFAULT_RETRY_HANDLER.

See Also:
Constant Field Values

CONFIG_PARAM_DEFAULT_DESTINATION

static final String CONFIG_PARAM_DEFAULT_DESTINATION
override the default destination ParamConfig.DEFAULT_DESTINATION.

Expects a member of Destination.

See Also:
Destination, InterfaceContext.getProperties(), Constant Field Values

CONFIG_PARAM_DEFAULT_INJECTOR

static final String CONFIG_PARAM_DEFAULT_INJECTOR
override the default injector ParamConfig.DEFAULT_INJECTOR.

Expects an instance of Injector.

See Also:
Injector, InterfaceContext.getProperties(), Constant Field Values

CONFIG_PARAM_DEFAULT_SERIALIZER

static final String CONFIG_PARAM_DEFAULT_SERIALIZER
override the default serializer ParamConfig.DEFAULT_SERIALIZER.

Expects an instance of Serializer.

See Also:
Serializer, InterfaceContext.getProperties(), Constant Field Values

CONFIG_PARAM_DEFAULT_NAME

static final String CONFIG_PARAM_DEFAULT_NAME
override the default name ParamConfig.DEFAULT_NAME.

Expects a string.

See Also:
InterfaceContext.getProperties(), Constant Field Values


Copyright © 2011. All Rights Reserved.