Package dev.getelements.elements.jrpc
Class JsonRpcHttpRedirectionStrategy
java.lang.Object
dev.getelements.elements.jrpc.JsonRpcHttpRedirectionStrategy
- All Implemented Interfaces:
JsonRpcRedirectionStrategy
Directs the client to the remote endpoint using a 307: Temporary Redirect to the underlying API.
-
Field Summary
Fields inherited from interface dev.getelements.elements.jrpc.JsonRpcRedirectionStrategy
NO_REDIRECT, REDIRECT_URLS
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JsonRpcHttpRedirectionStrategy
@Inject public JsonRpcHttpRedirectionStrategy(@Named("dev.getelements.elements.jrpc.redirect.urls") String urls)
-
-
Method Details
-
redirect
public void redirect(JsonRpcRequest jsonRpcRequest, Throwable original, Consumer<Object> responseConsumer, Consumer<Throwable> throwableConsumer) Description copied from interface:JsonRpcRedirectionStrategy
Redirects the JSON-RPC request.- Specified by:
redirect
in interfaceJsonRpcRedirectionStrategy
- Parameters:
jsonRpcRequest
- the requestoriginal
- the original exceptionresponseConsumer
- a response handlerthrowableConsumer
- a request handler
-