Annotation Type Remote


Identifies a proxy against a REST interface.
See Also:
  • Element Details

    • path

      REST service path.
      • An absolute URL.
      • A relative URL interpreted as relative to the root URL defined on the RestClient
      • No path interpreted as the class name (e.g. "http://localhost/root-url/org.foo.MyInterface")
      Notes:
      Returns:
      The annotation value.
      Default:
      ""
    • headers

      Default request headers.

      Specifies headers to set on all requests.

      Notes:
      Returns:
      The annotation value.
      Default:
      {}
    • headerList

      Default request header list.

      Specifies a supplier of headers to set on all requests.

      Notes:
      • Supplier class must provide a public no-arg constructor.
      Returns:
      The annotation value.
      Default:
      org.apache.juneau.http.header.HeaderList.Void.class
    • version

      Specifies the client version of this interface.

      Used to populate the "Client-Version" header that identifies what version of client this is so that the server side can handle older versions accordingly.

      The format of this is a string of the format #[.#[.#[...]] (e.g. "1.2.3").

      The server side then uses an OSGi-version matching pattern to identify which methods to call:

      // Call this method if Client-Version is at least 2.0. // Note that this also matches 2.0.1. @RestGet(path="/foobar", clientVersion="2.0") public Object method1() {...} // Call this method if Client-Version is at least 1.1, but less than 2.0. @RestGet(path="/foobar", clientVersion="[1.1,2.0)") public Object method2() {...} // Call this method if Client-Version is less than 1.1. @RestGet(path="/foobar", clientVersion="[0,1.1)") public Object method3() {...}

      Notes:
      Returns:
      The annotation value.
      Default:
      ""
    • versionHeader

      Specifies the client version header name.

      The default value is "Client-Version".

      Notes:
      Returns:
      The annotation value.
      Default:
      ""