Class DefaultRestResponse
java.lang.Object
com.aspectran.web.activity.response.AbstractRestResponse
com.aspectran.web.activity.response.DefaultRestResponse
- All Implemented Interfaces:
CustomTransformer
,RestResponse
The default RestResponse supports APON, JSON, and XML data types.
Created: 2019-06-16
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRestResponse
(Object data) DefaultRestResponse
(String label, Object data) -
Method Summary
Modifier and TypeMethodDescriptiongetContentType
(Activity activity) protected MediaType
getContentTypeByPathExtension
(String extension) void
protected void
transformByContentType
(Activity activity, String encoding, MediaType contentType) Methods inherited from class com.aspectran.web.activity.response.AbstractRestResponse
accepted, addHeader, badRequest, conflict, created, created, defaultContentType, determineContentType, determineEncoding, favorPathExtension, forbidden, getData, getDefaultContentType, getHeaders, getName, getStatus, ignoreAcceptHeader, ignoreUnknownPathExtensions, internalServerError, isFavorPathExtension, isIgnoreAcceptHeader, isIgnoreUnknownPathExtensions, isPrettyPrint, methodNotAllowed, movedPermanently, noContent, notAcceptable, notFound, notModified, ok, preconditionFailed, prettyPrint, seeOther, setData, setData, setDefaultContentType, setDefaultContentType, setFavorPathExtension, setHeader, setIgnoreAcceptHeader, setIgnoreUnknownPathExtensions, setPrettyPrint, setStatus, setStatus, temporaryRedirect, unauthorized, unsupportedMediaType
-
Constructor Details
-
DefaultRestResponse
public DefaultRestResponse() -
DefaultRestResponse
-
DefaultRestResponse
-
-
Method Details
-
getSupportedContentTypes
- Specified by:
getSupportedContentTypes
in classAbstractRestResponse
-
getContentTypeByPathExtension
- Specified by:
getContentTypeByPathExtension
in classAbstractRestResponse
-
transform
- Throws:
Exception
-
getContentType
-
transformByContentType
protected void transformByContentType(Activity activity, String encoding, MediaType contentType) throws Exception - Throws:
Exception
-