@Provider @Produces(value="application/x-java-serialized-object") @Consumes(value="application/x-java-serialized-object") @Deprecated public class SerializableProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<Serializable>, javax.ws.rs.ext.MessageBodyWriter<Serializable>
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:
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_SERIALIZABLE
Deprecated.
|
static javax.ws.rs.core.MediaType |
APPLICATION_SERIALIZABLE_TYPE
Deprecated.
|
Constructor and Description |
---|
SerializableProvider()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
long |
getSize(Serializable t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Deprecated.
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Deprecated.
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Deprecated.
|
Serializable |
readFrom(Class<Serializable> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
Deprecated.
|
void |
writeTo(Serializable t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
Deprecated.
|
public static final javax.ws.rs.core.MediaType APPLICATION_SERIALIZABLE_TYPE
public static final String APPLICATION_SERIALIZABLE
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
public long getSize(Serializable t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
public void writeTo(Serializable 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
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
IOException
javax.ws.rs.WebApplicationException
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Serializable>
public Serializable readFrom(Class<Serializable> 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
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Serializable>
IOException
javax.ws.rs.WebApplicationException
Copyright © 2019 JBoss by Red Hat. All rights reserved.