@Provider @Consumes(value="*/*") @Produces(value="*/*") public class CloudEventsProvider extends Object implements jakarta.ws.rs.ext.MessageBodyReader<io.cloudevents.CloudEvent>, jakarta.ws.rs.ext.MessageBodyWriter<io.cloudevents.CloudEvent>, jakarta.ws.rs.client.ClientRequestFilter
CloudEvent encoding and decoding for Jax-Rs Resources and with Client.| Modifier and Type | Field and Description |
|---|---|
static jakarta.ws.rs.core.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(jakarta.ws.rs.client.ClientRequestContext requestContext) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
jakarta.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
jakarta.ws.rs.core.MediaType mediaType) |
io.cloudevents.CloudEvent |
readFrom(Class<io.cloudevents.CloudEvent> type,
Type genericType,
Annotation[] annotations,
jakarta.ws.rs.core.MediaType mediaType,
jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(io.cloudevents.CloudEvent event,
Class<?> type,
Type genericType,
Annotation[] annotations,
jakarta.ws.rs.core.MediaType mediaType,
jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public static jakarta.ws.rs.core.MediaType CLOUDEVENT_TYPE
CloudEvent with Clientpublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<io.cloudevents.CloudEvent>public io.cloudevents.CloudEvent readFrom(Class<io.cloudevents.CloudEvent> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException
readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<io.cloudevents.CloudEvent>IOExceptionjakarta.ws.rs.WebApplicationExceptionpublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<io.cloudevents.CloudEvent>public void writeTo(io.cloudevents.CloudEvent event,
Class<?> type,
Type genericType,
Annotation[] annotations,
jakarta.ws.rs.core.MediaType mediaType,
jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException,
jakarta.ws.rs.WebApplicationException
writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<io.cloudevents.CloudEvent>IOExceptionjakarta.ws.rs.WebApplicationExceptionpublic void filter(jakarta.ws.rs.client.ClientRequestContext requestContext)
throws IOException
filter in interface jakarta.ws.rs.client.ClientRequestFilterIOExceptionCopyright © 2023. All rights reserved.