Package com.yahoo.restapi
Interface RestApi.Builder
- Enclosing interface:
- RestApi
public static interface RestApi.Builder
-
Method Summary
Modifier and TypeMethodDescription<EXCEPTION extends RuntimeException>
RestApi.BuilderaddExceptionMapper
(Class<EXCEPTION> type, RestApi.ExceptionMapper<EXCEPTION> mapper) seeRestApiMappers.DEFAULT_EXCEPTION_MAPPERS
for default mappersaddFilter
(RestApi.Filter filter) <REQUEST_ENTITY>
RestApi.BuilderaddRequestMapper
(Class<REQUEST_ENTITY> type, RestApi.RequestMapper<REQUEST_ENTITY> mapper) seeRestApiMappers.DEFAULT_REQUEST_MAPPERS
for default mappers<RESPONSE_ENTITY>
RestApi.BuilderaddResponseMapper
(Class<RESPONSE_ENTITY> type, RestApi.ResponseMapper<RESPONSE_ENTITY> mapper) seeRestApiMappers.DEFAULT_RESPONSE_MAPPERS
for default mappersaddRoute
(RestApi.RouteBuilder route) build()
Disables mappers listed inRestApiMappers.DEFAULT_EXCEPTION_MAPPERS
Disables mappers listed inRestApiMappers.DEFAULT_RESPONSE_MAPPERS
<REQUEST_ENTITY>
RestApi.BuilderregisterJacksonRequestEntity
(Class<REQUEST_ENTITY> type) <RESPONSE_ENTITY>
RestApi.BuilderregisterJacksonResponseEntity
(Class<RESPONSE_ENTITY> type) requiredCapabilities
(com.yahoo.security.tls.Capability... capabilities) requiredCapabilities
(com.yahoo.security.tls.CapabilitySet capabilities) setObjectMapper
(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Details
-
setObjectMapper
-
setDefaultRoute
-
addRoute
-
addFilter
-
addExceptionMapper
<EXCEPTION extends RuntimeException> RestApi.Builder addExceptionMapper(Class<EXCEPTION> type, RestApi.ExceptionMapper<EXCEPTION> mapper) seeRestApiMappers.DEFAULT_EXCEPTION_MAPPERS
for default mappers -
addResponseMapper
<RESPONSE_ENTITY> RestApi.Builder addResponseMapper(Class<RESPONSE_ENTITY> type, RestApi.ResponseMapper<RESPONSE_ENTITY> mapper) seeRestApiMappers.DEFAULT_RESPONSE_MAPPERS
for default mappers -
addRequestMapper
<REQUEST_ENTITY> RestApi.Builder addRequestMapper(Class<REQUEST_ENTITY> type, RestApi.RequestMapper<REQUEST_ENTITY> mapper) seeRestApiMappers.DEFAULT_REQUEST_MAPPERS
for default mappers -
registerJacksonResponseEntity
-
registerJacksonRequestEntity
-
disableDefaultExceptionMappers
RestApi.Builder disableDefaultExceptionMappers()Disables mappers listed inRestApiMappers.DEFAULT_EXCEPTION_MAPPERS
-
disableDefaultResponseMappers
RestApi.Builder disableDefaultResponseMappers()Disables mappers listed inRestApiMappers.DEFAULT_RESPONSE_MAPPERS
-
disableDefaultAclMapping
RestApi.Builder disableDefaultAclMapping() -
requiredCapabilities
-
requiredCapabilities
-
build
RestApi build()
-