@Produces(value={"application/x-www-form-urlencoded","multipart/form-data"}) @Consumes(value={"application/x-www-form-urlencoded","multipart/form-data"}) @Provider public class FormEncodingProvider<T> extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
BUNDLE, LOG
Constructor and Description |
---|
FormEncodingProvider() |
FormEncodingProvider(boolean expectEncoded) |
Modifier and Type | Method and Description |
---|---|
protected javax.ws.rs.core.MultivaluedMap<String,String> |
createMap(Class<?> clazz) |
long |
getSize(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
protected boolean |
keepEncoded(Annotation[] anns) |
protected void |
persistParamsOnMessage(javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected void |
populateMap(javax.ws.rs.core.MultivaluedMap<String,String> params,
Annotation[] anns,
InputStream is,
javax.ws.rs.core.MediaType mt,
boolean decode)
Retrieve map of parameters from the passed in message
|
T |
readFrom(Class<T> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setAttachmentDirectory(String dir) |
void |
setAttachmentMaxSize(String maxSize) |
void |
setAttachmentThreshold(String threshold) |
void |
setExpectedEncoded(boolean expect) |
void |
setValidator(FormValidator formValidator) |
protected void |
validateMap(javax.ws.rs.core.MultivaluedMap<String,String> params) |
void |
writeTo(T obj,
Class<?> c,
Type t,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
public FormEncodingProvider()
public FormEncodingProvider(boolean expectEncoded)
public void setExpectedEncoded(boolean expect)
public void setAttachmentDirectory(String dir)
public void setAttachmentThreshold(String threshold)
public void setAttachmentMaxSize(String maxSize)
public void setValidator(FormValidator formValidator)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<T>
public T readFrom(Class<T> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<T>
IOException
protected boolean keepEncoded(Annotation[] anns)
protected void persistParamsOnMessage(javax.ws.rs.core.MultivaluedMap<String,String> params)
protected javax.ws.rs.core.MultivaluedMap<String,String> createMap(Class<?> clazz) throws Exception
Exception
protected void populateMap(javax.ws.rs.core.MultivaluedMap<String,String> params, Annotation[] anns, InputStream is, javax.ws.rs.core.MediaType mt, boolean decode)
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public void writeTo(T obj, Class<?> c, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
javax.ws.rs.WebApplicationException
Apache CXF