|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MethodConfig
Method configuration holder object.
Implementors must respect the following contract :
- No method return null except for the ones documented or when used as an override template (see Configs.override(MethodConfig, MethodConfig)
)
- Defaults values must either be taken from interface's defaults constant or from InterfaceContext.getProperties()
's defaults overrides.
- Every arguments of every methods in the interface must have it's respective ParamConfig
configured in its respective MethodConfig
object.
MethodConfig
,
ParamConfig
,
InterfaceConfigFactory
Field Summary | |
---|---|
static long |
DEFAULT_CO_TIMEOUT
Default connection timeout applied when non specified. |
static Class<? extends ErrorHandler> |
DEFAULT_ERROR_HANDLER
Default error handler applied when non specified. |
static HttpMethod |
DEFAULT_HTTP_METHOD
Default http method applied when non specified. |
static StaticParam[] |
DEFAULT_PARAMS
Default method params. |
static String |
DEFAULT_PATH
Default url fragment applied when non specified. |
static Class<? extends RequestInterceptor> |
DEFAULT_REQUEST_INTERCEPTOR
Default request interceptor applied when non specified. |
static Class<? extends ResponseHandler> |
DEFAULT_RESPONSE_HANDLER
Default response handler applied when non specified. |
static Class<? extends RetryHandler> |
DEFAULT_RETRY_HANDLER
Default retry handler applied when non specified. |
static long |
DEFAULT_SO_TIMEOUT
Default socket timeout applied when non specified. |
Method Summary | |
---|---|
Long |
getConnectionTimeout()
|
ErrorHandler |
getErrorHandler()
|
HttpMethod |
getHttpMethod()
|
Method |
getMethod()
|
ParamConfig |
getParamConfig(int index)
Get the ParamConfig object holding the configuration of the method's arguments at the requested index. |
Integer |
getParamCount()
|
String |
getPath()
URL fragment specific to this methods. |
RequestInterceptor |
getRequestInterceptor()
|
ResponseHandler |
getResponseHandler()
|
RetryHandler |
getRetryHandler()
|
Long |
getSocketTimeout()
|
StaticParam[] |
getStaticParams()
|
Field Detail |
---|
static final long DEFAULT_SO_TIMEOUT
getSocketTimeout()
,
Constant Field Valuesstatic final long DEFAULT_CO_TIMEOUT
getConnectionTimeout()
,
Constant Field Valuesstatic final String DEFAULT_PATH
getPath()
,
Constant Field Valuesstatic final StaticParam[] DEFAULT_PARAMS
getPath()
static final HttpMethod DEFAULT_HTTP_METHOD
getHttpMethod()
static final Class<? extends ResponseHandler> DEFAULT_RESPONSE_HANDLER
getResponseHandler()
static final Class<? extends ErrorHandler> DEFAULT_ERROR_HANDLER
getErrorHandler()
static final Class<? extends RequestInterceptor> DEFAULT_REQUEST_INTERCEPTOR
getRequestInterceptor()
static final Class<? extends RetryHandler> DEFAULT_RETRY_HANDLER
getRetryHandler()
Method Detail |
---|
Method getMethod()
StaticParam[] getStaticParams()
ResponseHandler getResponseHandler()
ErrorHandler getErrorHandler()
RequestInterceptor getRequestInterceptor()
Long getSocketTimeout()
Long getConnectionTimeout()
RetryHandler getRetryHandler()
String getPath()
Doesn't contains the server part.
Full url is InterfaceConfig.getEndPoint()
+ InterfaceConfig.getContextPath()
+ getPath()
This value can contain placeholders that points to method arguments. For a path as /my-path/{2}/{0}/{2}.json?my-param={1}, any {n} placeholder will be replaced with the serialized parameter found at the respective method argument index when using the default parameter injector.
InterfaceConfig.getEndPoint()
,
InterfaceConfig.getContextPath()
HttpMethod getHttpMethod()
ParamConfig getParamConfig(int index)
index
-
Integer getParamCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |