Class RemoteOperationMeta
java.lang.Object
org.apache.juneau.rest.client.remote.RemoteOperationMeta
Contains the meta-data about a Java method on a REST proxy class.
Captures the information in @RemoteOp annotations for caching and reuse.
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteOperationMeta(String parentPath, Method m, String defaultMethod) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionforEachException(Consumer<Class<?>> action) Performs an action on the exceptions thrown by this method.forEachFormDataArg(Consumer<RemoteOperationArg> action) Performs an action on the@FormDataannotated arguments on this Java method.forEachHeaderArg(Consumer<RemoteOperationArg> action) Performs an action on the@Headerannotated arguments on this Java method.forEachPathArg(Consumer<RemoteOperationArg> action) Performs an action on the@Pathannotated arguments on this Java method.forEachQueryArg(Consumer<RemoteOperationArg> action) Performs an action on the@Queryannotated arguments on this Java method.Performs an action on the@Requestannotated arguments on this Java method.Returns the argument annotated with@Content.Returns the default value for a@Contentannotation on the method.getFormDataDefault(String name) Returns the default value for a@FormDataannotation on the method.Returns the absolute URI of the REST interface invoked by this Java method.getHeaderDefault(String name) Returns the default value for a@Headerannotation on the method.Returns the value of the@RemoteOp(method)annotation on this Java method.getPathDefault(String name) Returns the default value for a@Pathannotation on the method.getQueryDefault(String name) Returns the default value for a@Queryannotation on the method.Returns whether the method returns the HTTP response body or status code.
-
Constructor Details
-
RemoteOperationMeta
Constructor.- Parameters:
parentPath- The absolute URI of the REST interface backing the interface proxy.m- The Java method.defaultMethod- The default HTTP method if not specified through annotation.
-
-
Method Details
-
forEachException
Performs an action on the exceptions thrown by this method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
forEachFormDataArg
Performs an action on the@FormDataannotated arguments on this Java method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
forEachHeaderArg
Performs an action on the@Headerannotated arguments on this Java method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
forEachPathArg
Performs an action on the@Pathannotated arguments on this Java method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
forEachQueryArg
Performs an action on the@Queryannotated arguments on this Java method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
forEachRequestArg
Performs an action on the@Requestannotated arguments on this Java method.- Parameters:
action- The action to perform.- Returns:
- This object.
-
getContentArg
Returns the argument annotated with@Content.- Returns:
- A index of the argument with the
@Contentannotation, ornull if no argument exists.
-
getContentDefault
Returns the default value for a@Contentannotation on the method.- Returns:
- The default value, or
null if not specified. - Since:
- 9.2.0
-
getFormDataDefault
Returns the default value for a@FormDataannotation on the method.- Parameters:
name- The form data parameter name.- Returns:
- The default value, or
null if not specified. - Since:
- 9.2.0
-
getFullPath
Returns the absolute URI of the REST interface invoked by this Java method.- Returns:
- The absolute URI of the REST interface, never
null .
-
getHeaderDefault
Returns the default value for a@Headerannotation on the method.- Parameters:
name- The header name.- Returns:
- The default value, or
null if not specified. - Since:
- 9.2.0
-
getHttpMethod
Returns the value of the@RemoteOp(method)annotation on this Java method.- Returns:
- The value of the annotation, never
null .
-
getPathDefault
Returns the default value for a@Pathannotation on the method.- Parameters:
name- The path parameter name.- Returns:
- The default value, or
null if not specified. - Since:
- 9.2.0
-
getQueryDefault
Returns the default value for a@Queryannotation on the method.- Parameters:
name- The query parameter name.- Returns:
- The default value, or
null if not specified. - Since:
- 9.2.0
-
getReturns
Returns whether the method returns the HTTP response body or status code.- Returns:
- Whether the method returns the HTTP response body or status code.
-