public final class Introspectable extends Object implements RestConverter
PojoIntrospector
support on response objects returned by a
@RestMethod
method.
When enabled, public methods can be called on objects returned through the RestResponse.setOutput(Object)
method.
Note that opening up public methods for calling through a REST interface can be dangerous, and should be done with caution.
Java methods are invoked by passing in the following URL parameters:
&invokeMethod
- The Java method name, optionally with arguments if necessary to
differentiate between methods.
&invokeArgs
- The arguments as a JSON array.
PojoIntrospector
- Additional information on introspection of POJO methods.
RestContext.REST_converters
- Registering converters with REST resources.
Constructor and Description |
---|
Introspectable() |
Modifier and Type | Method and Description |
---|---|
Object |
convert(RestRequest req,
Object o)
Performs post-call conversion on the specified response object.
|
public Introspectable()
public Object convert(RestRequest req, Object o) throws RestException
RestConverter
convert
in interface RestConverter
req
- The servlet request.o
- The response object set by the REST method through the RestResponse.setOutput(Object)
method.RestException
- Thrown if any errors occur during conversion.Copyright © 2018 Apache. All rights reserved.