@Provider public abstract class BaseProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>
| Modifier and Type | Field and Description |
|---|---|
protected Class |
desiredType |
protected org.glassfish.hk2.api.ServiceLocator |
habitat |
static String |
HEADER_DEBUG |
static String |
JSONP_CALLBACK |
protected javax.inject.Provider<javax.ws.rs.core.HttpHeaders> |
requestHeaders |
protected javax.ws.rs.core.MediaType[] |
supportedMediaTypes |
protected javax.inject.Provider<javax.ws.rs.core.UriInfo> |
uriInfo |
| Constructor and Description |
|---|
BaseProvider(Class desiredType,
javax.ws.rs.core.MediaType... mediaType) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canShowDeprecatedItems()
returns true if the HTML viewer displays the deprecated elements or attributes
of a config bean
|
protected boolean |
canShowHiddenCommands()
returns true if the HTML viewer displays the hidden CLI command links
|
protected String |
getCallBackJSONP()
if a query param of name "jsoncallback" is there, returns its value
or returns null otherwise.
|
abstract String |
getContent(T proxy) |
protected int |
getFormattingIndentLevel() |
protected Map<String,String> |
getResourceLinks(org.jvnet.hk2.config.Dom dom) |
protected Map<String,String> |
getResourceLinks(List<org.jvnet.hk2.config.Dom> proxyList) |
long |
getSize(T t,
Class<?> type,
Type type1,
Annotation[] antns,
javax.ws.rs.core.MediaType mt) |
protected String |
getXmlCommandLinks(String[][] commandResourcesPaths,
String indent) |
protected boolean |
isDebug()
check for the __debug request header
|
protected boolean |
isGivenTypeWritable(Class<?> type,
Type genericType)
Overwrite this if you need different test of type compatibility.
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] antns,
javax.ws.rs.core.MediaType mt) |
void |
writeTo(T proxy,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public static final String HEADER_DEBUG
public static final String JSONP_CALLBACK
@Context protected javax.inject.Provider<javax.ws.rs.core.UriInfo> uriInfo
@Context protected javax.inject.Provider<javax.ws.rs.core.HttpHeaders> requestHeaders
@Context protected org.glassfish.hk2.api.ServiceLocator habitat
protected Class desiredType
protected javax.ws.rs.core.MediaType[] supportedMediaTypes
public BaseProvider(Class desiredType, javax.ws.rs.core.MediaType... mediaType)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] antns, javax.ws.rs.core.MediaType mt)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>protected boolean isGivenTypeWritable(Class<?> type, Type genericType)
public long getSize(T t, Class<?> type, Type type1, Annotation[] antns, javax.ws.rs.core.MediaType mt)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>public void writeTo(T proxy, 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<T>IOExceptionjavax.ws.rs.WebApplicationExceptionprotected int getFormattingIndentLevel()
protected boolean canShowHiddenCommands()
protected boolean canShowDeprecatedItems()
protected boolean isDebug()
protected String getCallBackJSONP()
protected String getXmlCommandLinks(String[][] commandResourcesPaths, String indent)
Copyright © 2017. All rights reserved.