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
ConstructorDescriptionRemoteOperationMeta
(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@FormData
annotated arguments on this Java method.forEachHeaderArg
(Consumer<RemoteOperationArg> action) Performs an action on the@Header
annotated arguments on this Java method.forEachPathArg
(Consumer<RemoteOperationArg> action) Performs an action on the@Path
annotated arguments on this Java method.forEachQueryArg
(Consumer<RemoteOperationArg> action) Performs an action on the@Query
annotated arguments on this Java method.Performs an action on the@Request
annotated arguments on this Java method.Returns the argument annotated with@Content
.Returns the absolute URI of the REST interface invoked by this Java method.Returns the value of the@RemoteOp(method)
annotation on this Java 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
-
getHttpMethod
Returns the value of the@RemoteOp(method)
annotation on this Java method.- Returns:
- The value of the annotation, never
null .
-
getFullPath
Returns the absolute URI of the REST interface invoked by this Java method.- Returns:
- The absolute URI of the REST interface, never
null .
-
forEachPathArg
Performs an action on the@Path
annotated arguments on this Java method.- Parameters:
action
- The action to perform.- Returns:
- This object.
-
forEachQueryArg
Performs an action on the@Query
annotated arguments on this Java method.- Parameters:
action
- The action to perform.- Returns:
- This object.
-
forEachFormDataArg
Performs an action on the@FormData
annotated arguments on this Java method.- Parameters:
action
- The action to perform.- Returns:
- This object.
-
forEachHeaderArg
Performs an action on the@Header
annotated arguments on this Java method.- Parameters:
action
- The action to perform.- Returns:
- This object.
-
forEachRequestArg
Performs an action on the@Request
annotated 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
@Content
annotation, ornull if no argument exists.
-
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.
-
forEachException
Performs an action on the exceptions thrown by this method.- Parameters:
action
- The action to perform.- Returns:
- This object.
-