Class RemoteOperationMeta

java.lang.Object
org.apache.juneau.rest.client.classic.remote.RemoteOperationMeta

public class RemoteOperationMeta extends Object
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 Details

    • RemoteOperationMeta

      public RemoteOperationMeta(String parentPath, Method m, String defaultMethod)
      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 @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.
    • 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.
    • 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, or null if no argument exists.
    • getContentDefault

      Returns the default value for a @Content annotation on the method.
      Returns:
      The default value, or null if not specified.
      Since:
      9.2.0
    • getFormDataDefault

      Returns the default value for a @FormData annotation on the method.
      Parameters:
      name - The form data parameter name.
      Returns:
      The default value, or null if not specified.
      Since:
      9.2.0
    • getFullPath

      public String 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 @Header annotation 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

      public String getPathDefault(String name)
      Returns the default value for a @Path annotation on the method.
      Parameters:
      name - The path parameter name.
      Returns:
      The default value, or null if not specified.
      Since:
      9.2.0
    • getQueryDefault

      public String getQueryDefault(String name)
      Returns the default value for a @Query annotation 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.
    • getBaseUrl

      public String getBaseUrl()
      Returns the method-level base/host override from the baseUrl annotation member.
      Returns:
      The base/host override. Never null, but may be empty.
    • getAccept

      public String getAccept()
      Returns the method-level default Accept media type from the accept annotation member.
      Returns:
      The accept media type. Never null, but may be empty.
    • getContentType

      Returns the method-level default Content-Type media type from the contentType annotation member.
      Returns:
      The content-type media type. Never null, but may be empty.
    • getConstantHeaders

      Returns the method-level constant headers from the headers annotation member.
      Returns:
      An unmodifiable list of name/value entries. Never null, but may be empty.
    • getConstantQueryData

      Returns the method-level constant query parameters from the queryData annotation member.
      Returns:
      An unmodifiable list of name/value entries. Never null, but may be empty.
    • getConstantFormData

      Returns the method-level constant form-data parameters from the formData annotation member.
      Returns:
      An unmodifiable list of name/value entries. Never null, but may be empty.
    • getTimeout

      public String getTimeout()
      Returns the method-level per-call timeout duration string from the timeout annotation member.
      Returns:
      The timeout duration string. Never null, but may be empty.
    • getRetries

      public int getRetries()
      Returns the method-level maximum retry attempts from the retries annotation member.
      Returns:
      The retry count.
    • isRetryNonIdempotent

      public boolean isRetryNonIdempotent()
      Returns whether the method opts non-idempotent verbs into automatic retries (retryNonIdempotent member).
      Returns:
      true if non-idempotent retries are opted in at the method level.
    • isThrowOnError

      public boolean isThrowOnError()
      Returns whether the method throws a generic exception on an unmatched error response (throwOnError member).
      Returns:
      true if throwOnError is set at the method level.
    • getUrlParamIndex

      public int getUrlParamIndex()
      Returns the index of the @Url parameter, or -1 if none.
      Returns:
      The @Url parameter index, or -1.