Interface RestOpArg

All Known Implementing Classes:
AttributeArg, ContentArg, DefaultArg, FormDataArg, HasFormDataArg, HasQueryArg, HeaderArg, HttpServletRequestArgs, HttpServletResponseArgs, HttpSessionArgs, InputStreamParserArg, MethodArg, ParserArg, PathArg, QueryArg, ReaderParserArg, RequestBeanArg, ResponseBeanArg, ResponseCodeArg, ResponseHeaderArg, RestContextArgs, RestOpContextArgs, RestOpSessionArgs, RestRequestArgs, RestResponseArgs, RestSessionArgs, SimpleRestOperationArg

public interface RestOpArg
REST java method parameter resolver.

Used to resolve parameter values when invoking RestOp-annotated methods.

Example:

// A simple parameter resolver that resolves TimeZone parameters. public class TimeZoneArg implements RestOpArg { // Implementers must provide a static creator method that returns a RestParam if it's // applicable to the specified parameter. public static TimeZoneArg create(ParamInfo paramInfo) { if (paramInfo.isType(TimeZone.class)) return new TimeZoneArg(); return null; } protected TimeZoneArg() {} @Override public Object resolve(RestOpSession opSession) throws Exception { return opSession.getRequest().getHeaders().getTimeZone(); } }

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Resolves the parameter object.
  • Method Details