com.supermap.services.rest.encoders
Class RJsonEncoder
- java.lang.Object
-
- com.supermap.services.rest.encoders.Encoder
-
- com.supermap.services.rest.encoders.JsonEncoder
-
- com.supermap.services.rest.encoders.RJsonEncoder
-
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyWriter
@Provider public class RJsonEncoder extends JsonEncoder implements javax.ws.rs.ext.MessageBodyWriter
${services_rest_encoders_RJsonEncoder_Title}
${services_rest_encoders_RJsonEncoder_Description}
-
-
Constructor Summary
Constructors Constructor and Description RJsonEncoder()${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}
-
Method Summary
Methods Modifier and Type Method and Description protected java.util.List<MediaType>createSupportedMediaTypes()${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}protected booleanisindent()Whether to generate a string in an indented format.booleanisWriteable(java.lang.Class arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3)Determines whether the present expression supports the representation of the specified media type.RepresentationtoRepresentation(MediaType mediaType, java.lang.Object resourceObj)${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}-
Methods inherited from class com.supermap.services.rest.encoders.JsonEncoder
getSize, toFormatedObject, toFormatedString, writeTo
-
Methods inherited from class com.supermap.services.rest.encoders.Encoder
getSupportedMediaTypes, isEncodeAllow
-
-
-
-
Constructor Detail
-
RJsonEncoder
public RJsonEncoder()
${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}
${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Description}
-
-
Method Detail
-
createSupportedMediaTypes
protected java.util.List<MediaType> createSupportedMediaTypes()
${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}
${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Description}
- Overrides:
createSupportedMediaTypesin classJsonEncoder- Returns:
- ${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_return}
-
toRepresentation
public Representation toRepresentation(MediaType mediaType, java.lang.Object resourceObj)${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}
${services_rest_encoders_RJsonEncoder_method_toRepresentation_Description}
- Overrides:
toRepresentationin classJsonEncoder- Parameters:
mediaType- ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_mediaType}resourceObj- ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_resourceObj}- Returns:
- ${services_rest_encoders_RJsonEncoder_method_toRepresentation_return}
-
isindent
protected boolean isindent()
Whether to generate a string in an indented format.
- Overrides:
isindentin classJsonEncoder- Returns:
- Returns true if the string is generated in an indented format, false otherwise.
-
isWriteable
public boolean isWriteable(java.lang.Class arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3)Description copied from class:JsonEncoderDetermines whether the present expression supports the representation of the specified media type.
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter- Overrides:
isWriteablein classJsonEncoder- Parameters:
arg0- The type of object to generate the expression.arg1- the specified object type.arg2- annotation array, the resource has these annotation methods to return to the object to be written.arg3- The media type of the expected response.- Returns:
- Returns true if this expression generator supports the specified media type, false otherwise.
-
-