Annotation Interface ResponseCodeMapper
@Retention(RUNTIME)
@Target(METHOD)
@Repeatable(ResponseCodeMappers.class)
public @interface ResponseCodeMapper
Русский: Аннотация позволяет указывать обработчики HTTP ответов на определенные HTTP статус коды
English: Annotation allows you to specify HTTP response handlers for specific HTTP status codes
Пример / Example:
English: Annotation allows you to specify HTTP response handlers for specific HTTP status codes
Пример / Example:
@HttpClient("my.config")
public interface MyHttpclient {
@ResponseCodeMapper(code = DEFAULT, mapper = MyOtherMapper.class)
@ResponseCodeMapper(code = 200, mapper = MyMapper.class)
@HttpRoute(method = HttpMethod.POST, path = "/users/status")
void postStatus();
}
- See Also:
-
Nested Class Summary
Nested Classes -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intРусский: Указывает что обработчик будет действовать для любого HTTP статус кода за исключением других указанныхResponseCodeMapperEnglish: Specifies that the handler will act on any HTTP status code except for other specifiedResponseCodeMapper
-
Field Details
-
DEFAULT
static final int DEFAULTРусский: Указывает что обработчик будет действовать для любого HTTP статус кода за исключением других указанныхResponseCodeMapper
English: Specifies that the handler will act on any HTTP status code except for other specifiedResponseCodeMapper- See Also:
-
-
Element Details
-
code
int code- Returns:
- Русский: Указывает для какого HTTP статус кода зарегистрировать обработчик
English: Specifies for which HTTP status code to register the handler
-
-
-
type
Class<?> type- Default:
- java.lang.Object.class
-
mapper
Class<? extends HttpClientResponseMapper> mapper- Returns:
- Русский: Указывает реализацию обработчика который требуется зарегистрировать
English: Specifies the implementation of the handler to be registered
- Default:
- ru.tinkoff.kora.http.client.common.response.HttpClientResponseMapper.class
-