Package org.apache.struts2.rest.handler
Interface ContentTypeHandler
- All Known Implementing Classes:
AbstractContentTypeHandler
,FormUrlEncodedHandler
,HtmlHandler
,JacksonJsonHandler
,JacksonXmlHandler
,JuneauXmlHandler
,MultipartFormDataHandler
,XStreamHandler
public interface ContentTypeHandler
Handles transferring content to and from objects for a specific content type
-
Method Summary
Modifier and TypeMethodDescriptionfromObject
(ActionInvocation invocation, Object obj, String resultCode, Writer stream) Gets the content type for this handlerGets the extension this handler supportsvoid
toObject
(ActionInvocation invocation, Reader in, Object target)
-
Method Details
-
toObject
- Throws:
IOException
-
fromObject
String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream) throws IOException - Throws:
IOException
-
getContentType
String getContentType()Gets the content type for this handler- Returns:
- The mime type
-
getExtension
String getExtension()Gets the extension this handler supports- Returns:
- The extension
-