Package com.linecorp.armeria.server.annotation
Annotations for building a RESTful service.
-
Interface Summary Interface Description DecoratorFactoryFunction<T extends Annotation> A decorator factory which is used for a user-defined decorator annotation.ExceptionHandlerFunction An interface for exception handler.HttpResult<T> An interface which helps a user specify anHttpStatus
orResponseHeaders
for a response produced by an annotated HTTP service method.RequestConverterFunction Converts anAggregatedHttpRequest
to an object.ResponseConverterFunction Converts aresult
object toHttpResponse
.ResponseConverterFunctionProvider AResponseConverterFunction
provider interface which creates a newResponseConverterFunction
for converting an object of the given type and functions. -
Class Summary Class Description ByteArrayRequestConverterFunction A default implementation of aRequestConverterFunction
which converts a binary body of theAggregatedHttpRequest
to one ofbyte[]
orHttpData
.ByteArrayResponseConverterFunction A response converter implementation which creates anHttpResponse
withcontent-type: application/binary
orcontent-type: application/octet-stream
.JacksonRequestConverterFunction A default implementation of aRequestConverterFunction
which converts a JSON body of theAggregatedHttpRequest
to an object byObjectMapper
.JacksonResponseConverterFunction A response converter implementation which creates anHttpResponse
withcontent-type: application/json; charset=utf-8
orcontent-type: application/json-seq
.NullToNoContentResponseConverterFunction A response converter implementation which creates anHttpResponse
ofHttpStatus.NO_CONTENT
when the specifiedresult
isnull
.ServerSentEventResponseConverterFunction A response converter implementation which creates anHttpResponse
withcontent-type: text/event-stream
.StringRequestConverterFunction A default implementation of aRequestConverterFunction
which converts a text body of theAggregatedHttpRequest
to aString
.StringResponseConverterFunction A response converter implementation which creates anHttpResponse
withcontent-type: text/plain
. -
Enum Summary Enum Description ExceptionVerbosity The verbosity of exceptions logged by annotated HTTP services. -
Exception Summary Exception Description FallthroughException ARuntimeException
raised for falling through to the next something. -
Annotation Types Summary Annotation Type Description AdditionalHeader Annotation for an additional HTTP header.AdditionalHeaders The containing annotation type forAdditionalHeader
.AdditionalTrailer Annotation for an additional HTTP trailer.AdditionalTrailers The containing annotation type forAdditionalTrailer
.Blocking Specifies that the annotated service method must be invoked from the blocking task executor instead of an event loop thread.Consumes Specifies a media type which would be consumed by the service method or class.ConsumesBinary An alias for@Consumes(MediaTypeNames.APPLICATION_BINARY)
.ConsumesGroup The containing annotation type forConsumes
.ConsumesJson An alias for@Consumes(MediaTypeNames.JSON)
.ConsumesOctetStream An alias for@Consumes(MediaTypeNames.OCTET_STREAM)
.ConsumesText An alias for@Consumes(MediaTypeNames.PLAIN_TEXT_UTF_8)
.Decorator Specifies aDecoratingHttpServiceFunction
class which handles anHttpRequest
before invoking an annotated service method.DecoratorFactory Specifies aDecoratorFactoryFunction
class which is a factory to create a decorator.Decorators The containing annotation type forDecorator
.Default Specifies the default value of an optional parameter.Delete Annotation for mappingHttpMethod.DELETE
onto specific method.Description An annotation used in annotated HTTP service.ExceptionHandler Specifies anExceptionHandlerFunction
class which handles exceptions throwing from an annotated service method.ExceptionHandlers The containing annotation type forExceptionHandler
.Get Annotation for mappingHttpMethod.GET
onto specific method.Head Annotation for mappingHttpMethod.HEAD
onto specific method.Header Annotation for mapping an HTTP request header onto the following elements.MatchesHeader Specifies a predicate which evaluates whether a request can be accepted by a service method.MatchesHeaders The containing annotation type forMatchesHeader
.MatchesParam Specifies a predicate which evaluates whether a request can be accepted by a service method.MatchesParams The containing annotation type forMatchesParam
.Options Annotation for mappingHttpMethod.OPTIONS
onto specific method.Order Specifies an order which is used to sort the annotated service methods.Param Annotation for mapping a parameter of a request onto the following elements.Patch Annotation for mappingHttpMethod.PATCH
onto specific method.Path Annotation for mapping dynamic web requests onto specific method.PathPrefix Annotation that can be used on a class as a path prefix for all the methods that handle http request.Paths The containing annotation type forPath
.Post Annotation for mappingHttpMethod.POST
onto specific method.Produces Specifies a media type which would be produced by the service method or class.ProducesBinary An alias for@Produces(MediaTypeNames.APPLICATION_BINARY)
.ProducesEventStream An alias for@Produces(MediaTypeNames.EVENT_STREAM)
and@ResponseConverter(ServerSentEventResponseConverterFunction.class)
.ProducesGroup The containing annotation type forProduces
.ProducesJson An alias for@Produces(MediaTypeNames.JSON_UTF_8)
.ProducesJsonSequences An alias for@Produces(MediaTypeNames.JSON_SEQ)
.ProducesOctetStream An alias for@Produces(MediaTypeNames.OCTET_STREAM)
.ProducesText An alias for@Produces(MediaTypeNames.PLAIN_TEXT_UTF_8)
.Put Annotation for mappingHttpMethod.PUT
onto specific method.RequestConverter Specifies aRequestConverterFunction
class which converts anAggregatedHttpRequest
to an object.RequestConverters The containing annotation type forRequestConverter
.RequestObject Specifies which element should be converted byRequestConverterFunction
.ResponseConverter Specifies aResponseConverterFunction
class which converts the result toHttpResponse
.ResponseConverters The containing annotation type forResponseConverter
.ServiceName Annotation for service name that is often used as a meter tag or distributed trace's span name.StatusCode An annotation which specifies a default HTTP status code of a response produced by an annotated HTTP service.Trace Annotation for mappingHttpMethod.TRACE
onto specific method.