package org.gcube.common.clients.config; import org.gcube.common.clients.cache.EndpointCache; import org.gcube.common.clients.delegates.DiscoveryDelegate; import org.gcube.common.clients.delegates.ProxyPlugin; import org.gcube.common.clients.queries.Query; /** * The configuration of a proxy created in discovery mode. * * @author Fabio Simeoni * * @param the type of service addresses * @param the type of service stubs * * @see DiscoveryDelegate * */ public class DiscoveryConfig extends AbstractConfig { private final Query query; private final EndpointCache cache; /** * Creates an instance with a given {@link ProxyPlugin}, {@link Query} and call timeout. * @param plugin the plugin * @param query the query * @param the timeout */ public DiscoveryConfig(ProxyPlugin plugin,Query query, EndpointCache cache) { super(plugin); this.query=query; this.cache=cache; } /** * Returns the address cache used by the proxy. * @return the cache */ public EndpointCache cache() { return cache; } /** * Returns the query used by the proxy. * @return the query */ public Query query() { return query; } }