Class RemoteClient
java.lang.Object
org.apache.juneau.rest.client.remote.RemoteClient
Creates Java proxy instances for
Remote-annotated interfaces, backed by an RestClient.
Each interface method call translates to an HTTP request via the client.
Obtain instances via RestClient.remote(Class).
See Also:
- Since:
- 9.2.1
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RemoteClient
Constructor.- Parameters:
client- The underlying REST client. Must not benull .
-
-
Method Details
-
create
Creates a Java proxy for the givenRemote-annotated interface.- Type Parameters:
T- The interface type.- Parameters:
iface- The interface class. Must be annotated withRemote. Must not benull .- Returns:
- A proxy instance. Never
null . - Throws:
IllegalArgumentException- Ififaceis not an interface or not annotated withRemote.
-