public abstract class GenericResponseBuilderFactory extends Object
GenericResponseBuilder
.
This class is not meant to be consumed directly. Instead the GenericResponses
class
should be used for obtaining an instance of a builder. This factory exists as a helper to
GenericResponses
and allows it to obtain the correct builder implementation class.
Constructor and Description |
---|
GenericResponseBuilderFactory() |
Modifier and Type | Method and Description |
---|---|
abstract <T> GenericResponseBuilder<T> |
create(int status)
Creates a new instance of
GenericResponseBuilder with the given status. |
abstract <T> GenericResponseBuilder<T> |
create(int status,
T body)
Creates a new instance of
GenericResponseBuilder with the given status and entity
body. |
abstract <T> GenericResponseBuilder<T> |
create(int status,
T body,
Annotation[] annotations)
Creates a new instance of
GenericResponseBuilder . |
static GenericResponseBuilderFactory |
newInstance()
Creates a new instance of
GenericResponseBuilderFactory using ServiceLoader . |
public static GenericResponseBuilderFactory newInstance()
GenericResponseBuilderFactory
using ServiceLoader
.public abstract <T> GenericResponseBuilder<T> create(int status)
GenericResponseBuilder
with the given status.public abstract <T> GenericResponseBuilder<T> create(int status, T body)
GenericResponseBuilder
with the given status and entity
body.public abstract <T> GenericResponseBuilder<T> create(int status, T body, Annotation[] annotations)
GenericResponseBuilder
.T
- the type of the entity bodystatus
- the status for the new response builderbody
- the entity body for the new response builderannotations
- annotations, in addition to the annotations on the resource method
returning the response, to be passed to the MessageBodyWriter
Copyright © 2020 Cerner Innovation, Inc.. All rights reserved.