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>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDelegateProvider(jakarta.ws.rs.ext.MessageBodyReader<T> reader, jakarta.ws.rs.ext.MessageBodyWriter<T> writer) -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) private static booleanisJaxRs2()booleanisReadable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) 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 booleanvoidwriteTo(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Field Details
-
reader
-
writer
-
-
Constructor Details
-
DelegateProvider
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein 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:
readFromin 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:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
isWriteable
public boolean isWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein 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:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<T>- Throws:
IOException
-
shouldThrowNoContentExceptionOnEmptyStreams
protected boolean shouldThrowNoContentExceptionOnEmptyStreams() -
isJaxRs2
private static boolean isJaxRs2()
-