Class SerializableProvider
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.SerializableProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<java.io.Serializable>,javax.ws.rs.ext.MessageBodyWriter<java.io.Serializable>
@Provider @Produces("application/x-java-serialized-object") @Consumes("application/x-java-serialized-object") @Deprecated public class SerializableProvider extends java.lang.Object implements javax.ws.rs.ext.MessageBodyReader<java.io.Serializable>, javax.ws.rs.ext.MessageBodyWriter<java.io.Serializable>Deprecated.MessageBodyReader+Writer for serialized java objects. This Provider has been disabled by default because deserializing java objects from untrusted sources is unsafe. (See http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/ or https://access.redhat.com/security/cve/cve-2015-7501). In case your application uses serialized objects and you trust your remote REST partners, then you may enable this provider:- Either by providing a file "META-INF/services/javax.ws.rs.ext.Providers" with the fully qualified classname in classpath (See src/main/resources/ for an example. Multiple files in different jars are additive.)
- Or register() this Provider at ResteasyProviderFactory or at the jax-rs client.
- Version:
- $Revision: 1.1 $ Created Mar 23, 2012
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPLICATION_SERIALIZABLEDeprecated.static javax.ws.rs.core.MediaTypeAPPLICATION_SERIALIZABLE_TYPEDeprecated.
-
Constructor Summary
Constructors Constructor Description SerializableProvider()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetSize(java.io.Serializable t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.booleanisReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.booleanisWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.java.io.SerializablereadFrom(java.lang.Class<java.io.Serializable> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)Deprecated.voidwriteTo(java.io.Serializable t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)Deprecated.
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<java.io.Serializable>
-
getSize
public long getSize(java.io.Serializable t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<java.io.Serializable>
-
writeTo
public void writeTo(java.io.Serializable t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationExceptionDeprecated.- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<java.io.Serializable>- Throws:
java.io.IOExceptionjavax.ws.rs.WebApplicationException
-
isReadable
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.- Specified by:
isReadablein interfacejavax.ws.rs.ext.MessageBodyReader<java.io.Serializable>
-
readFrom
public java.io.Serializable readFrom(java.lang.Class<java.io.Serializable> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationExceptionDeprecated.- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<java.io.Serializable>- Throws:
java.io.IOExceptionjavax.ws.rs.WebApplicationException
-
-