S - the type of service endpoint stubs used by Callspublic class MockDelegate<S> extends Object implements ProxyDelegate<S>
ProxyDelegate for mock testing.| Modifier and Type | Method and Description |
|---|---|
ProxyConfig<?,S> |
config()
Returns the configuration of the proxy.
|
<V> V |
make(Call<S,V> call)
Makes a
Call to a given service endpoint. |
static <S> ProxyDelegate<S> |
mockDelegate(ProxyPlugin<?,S,?> plugin,
S endpoint)
Creates an instance with a
ProxyPlugin and a mock endpoints. |
public static <S> ProxyDelegate<S> mockDelegate(ProxyPlugin<?,S,?> plugin, S endpoint)
ProxyPlugin and a mock endpoints.plugin - the pluginendpoint - the endpointpublic <V> V make(Call<S,V> call) throws Exception
ProxyDelegateCall to a given service endpoint.make in interface ProxyDelegate<S>V - the type of the value returned from the callcall - the callException - if the call failspublic ProxyConfig<?,S> config()
ProxyDelegateconfig in interface ProxyDelegate<S>Copyright © 2017. All Rights Reserved.