Package org.apache.johnzon.jaxrs
Class DelegateProvider<T>
- java.lang.Object
-
- org.apache.johnzon.jaxrs.DelegateProvider<T>
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<T>
,jakarta.ws.rs.ext.MessageBodyWriter<T>
- Direct Known Subclasses:
JohnzonProvider
,JsrProvider
,WildcardJohnzonProvider
,WildcardJsrProvider
public abstract class DelegateProvider<T> extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<T>, jakarta.ws.rs.ext.MessageBodyReader<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegateProvider(jakarta.ws.rs.ext.MessageBodyReader<T> reader, jakarta.ws.rs.ext.MessageBodyWriter<T> writer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
private static boolean
isJaxRs2()
boolean
isReadable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
boolean
isWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
T
readFrom(Class<T> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
protected boolean
shouldThrowNoContentExceptionOnEmptyStreams()
void
writeTo(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejakarta.ws.rs.ext.MessageBodyReader<T>
-
readFrom
public T readFrom(Class<T> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
- Specified by:
readFrom
in interfacejakarta.ws.rs.ext.MessageBodyReader<T>
- Throws:
IOException
-
getSize
public long getSize(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
isWriteable
public boolean isWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
- Throws:
IOException
-
shouldThrowNoContentExceptionOnEmptyStreams
protected boolean shouldThrowNoContentExceptionOnEmptyStreams()
-
isJaxRs2
private static boolean isJaxRs2()
-
-