Create a new Remote Interface against a
RemoteInterface-annotated class.
Remote interfaces are interfaces exposed on the server side using either the RrpcServlet
or RRPC
REST methods.
The URL to the REST interface is based on the following values:
- The
RemoteResource#path() annotation on the interface (
remote-path
).
- The
RestClientBuilder#rootUrl(Object) on the client (
root-url
).
- The fully-qualified class name of the interface (
class-name
).
The URL calculation is as follows:
remote-path
- If remote path is absolute.
root-url/remote-path
- If remote path is relative and root-url has been specified.
root-url/class-name
- If remote path is not specified.
If the information is not available to resolve to an absolute URL, a
RemoteMetadataException is thrown.
Notes:
-
If you plan on using your proxy in a multi-threaded environment, you'll want to use an underlying
pooling client connection manager.
The easiest way to do this is to use the
RestClientBuilder#pooled() method.
If you don't do this, you may end up seeing "Connection still allocated" exceptions.