@Provider @Consumes(value="*/*") @Produces(value="*/*") public class CloudEventsProvider extends Object implements MessageBodyReader<io.cloudevents.CloudEvent>, MessageBodyWriter<io.cloudevents.CloudEvent>, ClientRequestFilter
CloudEvent encoding and decoding for Jax-Rs Resources and with Client.| Modifier and Type | Field and Description |
|---|---|
static MediaType |
CLOUDEVENT_TYPE
The content type to use when sending
CloudEvent with Client |
| Constructor and Description |
|---|
CloudEventsProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
filter(ClientRequestContext requestContext) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
io.cloudevents.CloudEvent |
readFrom(Class<io.cloudevents.CloudEvent> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(io.cloudevents.CloudEvent event,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSizepublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isReadable in interface MessageBodyReader<io.cloudevents.CloudEvent>public io.cloudevents.CloudEvent readFrom(Class<io.cloudevents.CloudEvent> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException
readFrom in interface MessageBodyReader<io.cloudevents.CloudEvent>IOExceptionWebApplicationExceptionpublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isWriteable in interface MessageBodyWriter<io.cloudevents.CloudEvent>public void writeTo(io.cloudevents.CloudEvent event,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException,
WebApplicationException
writeTo in interface MessageBodyWriter<io.cloudevents.CloudEvent>IOExceptionWebApplicationExceptionpublic void filter(ClientRequestContext requestContext) throws IOException
filter in interface ClientRequestFilterIOExceptionCopyright © 2021. All rights reserved.