Class JsonJerseyProvider
- java.lang.Object
-
- org.apache.streampipes.rest.shared.serializer.JsonJerseyProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>,javax.ws.rs.ext.MessageBodyWriter<Object>
- Direct Known Subclasses:
GsonJerseyProvider,JacksonSerializationProvider
public abstract class JsonJerseyProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>
-
-
Constructor Summary
Constructors Constructor Description JsonJerseyProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Objectdeserialize(InputStreamReader reader, Type type)longgetSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)protected booleanjsonSerialized(javax.ws.rs.core.MediaType mediaType)ObjectreadFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)protected abstract booleanrequiredAnnotationsPresent(Annotation[] annotations)protected abstract voidserialize(Object t, Type type, Writer writer)voidwriteTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadablein interfacejavax.ws.rs.ext.MessageBodyReader<Object>
-
readFrom
public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<Object>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
getSize
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
writeTo
public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Object>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
jsonSerialized
protected boolean jsonSerialized(javax.ws.rs.core.MediaType mediaType)
-
requiredAnnotationsPresent
protected abstract boolean requiredAnnotationsPresent(Annotation[] annotations)
-
serialize
protected abstract void serialize(Object t, Type type, Writer writer) throws IOException
- Throws:
IOException
-
deserialize
protected abstract Object deserialize(InputStreamReader reader, Type type) throws IOException
- Throws:
IOException
-
-