Class DirectDelegate<A,S>
java.lang.Object
org.gcube.common.clients.delegates.AbstractDelegate<A,S,EndpointConfig<A,S>>
org.gcube.common.clients.delegates.DirectDelegate<A,S>
- Type Parameters:
A- the of service addressesS- the type of service proxies
- All Implemented Interfaces:
ProxyDelegate<S>
public final class DirectDelegate<A,S>
extends AbstractDelegate<A,S,EndpointConfig<A,S>>
implements ProxyDelegate<S>
A
ProxyDelegate that sends Calls to service endpoints at known addresses.
This is a no-op ProxyDelegate, i.e. it executes the Call interface and converts its faults.
It exists to support uniform programming against the ProxyDelegate interface.
- Author:
- Fabio Simeoni
-
Constructor Summary
ConstructorsConstructorDescriptionDirectDelegate(EndpointConfig<A, S> config) Creates an instance with a given configuration. -
Method Summary
Methods inherited from class org.gcube.common.clients.delegates.AbstractDelegate
config, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.common.clients.delegates.ProxyDelegate
config
-
Constructor Details
-
DirectDelegate
Creates an instance with a given configuration.- Parameters:
config- the configuration
-
-
Method Details
-
make
Description copied from interface:ProxyDelegateMakes aCallto a given service endpoint.- Specified by:
makein interfaceProxyDelegate<A>- Type Parameters:
V- the type of the value returned from the call- Parameters:
call- the call- Returns:
- the value returned from the call
- Throws:
Exception- if the call fails
-