com.bea.wlp.rest.results
Interface Formatter


public interface Formatter

Interface for classes that can format RestResults. There are two basic implementations of this interface that are currently implemented by the REST framework, one for XML formatting and the other for JSON formatting. In general, these are used by RestResult implementations to transform themselves into a particular format. GenericRestResult is aware of both of these types. If another format type is needed, a custom RestResult type will need to be implemented that knows about the custom Formatter.


Method Summary
 Object format(RestResult restResult)
          Transforms a RestResult into a formatted Object that can then be sent from the RestServlet back to the client.
 

Method Detail

format

Object format(RestResult restResult)
Transforms a RestResult into a formatted Object that can then be sent from the RestServlet back to the client. This is typically simply a String, but, depending on the content type returned by the handling RestResult, can also be any arbitrary type.

Parameters
restResult - the RestResult to transform.
Returns
the formatted RestResult


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.