public class BaseProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
Modifier | Constructor and Description |
---|---|
protected |
BaseProvider()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ObjectMap |
getMethodProperties(Annotation[] a)
Returns properties defined on the specified method through the
@RestMethod.properties()
annotation specified on the method and the JuneauProvider.properties() annotation specified on the
provider class. |
long |
getSize(Object o,
Class<?> type,
Type gType,
Annotation[] a,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type gType,
Annotation[] a,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type gType,
Annotation[] a,
javax.ws.rs.core.MediaType mediaType) |
Object |
readFrom(Class<Object> type,
Type gType,
Annotation[] a,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream in) |
void |
writeTo(Object o,
Class<?> type,
Type gType,
Annotation[] a,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
protected BaseProvider()
protected ObjectMap getMethodProperties(Annotation[] a)
@RestMethod.properties()
annotation specified on the method and the JuneauProvider.properties()
annotation specified on the
provider class.a
- All annotations defined on the method.public long getSize(Object o, Class<?> type, Type gType, Annotation[] a, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public boolean isWriteable(Class<?> type, Type gType, Annotation[] a, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public void writeTo(Object o, Class<?> type, Type gType, Annotation[] a, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
javax.ws.rs.WebApplicationException
public boolean isReadable(Class<?> type, Type gType, Annotation[] a, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
public Object readFrom(Class<Object> type, Type gType, Annotation[] a, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream in) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
IOException
javax.ws.rs.WebApplicationException
Copyright © 2018 Apache. All rights reserved.