Package org.apache.struts2.rest.handler
Class JuneauXmlHandler
java.lang.Object
org.apache.struts2.rest.handler.JuneauXmlHandler
- All Implemented Interfaces:
ContentTypeHandler
Handles XML content using Apache Juneau
http://juneau.apache.org/#marshall.html
-
Constructor Summary
Constructors -
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)
-
Constructor Details
-
JuneauXmlHandler
public JuneauXmlHandler()
-
-
Method Details
-
toObject
- Specified by:
toObject
in interfaceContentTypeHandler
- Throws:
IOException
-
fromObject
public String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream) throws IOException - Specified by:
fromObject
in interfaceContentTypeHandler
- Throws:
IOException
-
getContentType
Description copied from interface:ContentTypeHandler
Gets the content type for this handler- Specified by:
getContentType
in interfaceContentTypeHandler
- Returns:
- The mime type
-
getExtension
Description copied from interface:ContentTypeHandler
Gets the extension this handler supports- Specified by:
getExtension
in interfaceContentTypeHandler
- Returns:
- The extension
-