Class AbstractStatelessBuilder<A,S,P>
java.lang.Object
org.gcube.common.clients.builders.AbstractBuilder<A,S,P>
org.gcube.common.clients.builders.AbstractStatelessBuilder<A,S,P>
- Type Parameters:
A- the type of service addressesS- the type of service stubsP- the type of service proxies
- All Implemented Interfaces:
StatelessBuilderAPI.Builder<P>,StatelessBuilderAPI.FinalClause<P>,StatelessBuilderAPI.SecondClause<P>
public abstract class AbstractStatelessBuilder<A,S,P>
extends AbstractBuilder<A,S,P>
implements StatelessBuilderAPI.Builder<P>, StatelessBuilderAPI.SecondClause<P>, StatelessBuilderAPI.FinalClause<P>
Partial implementation of proxy builders for stateless services.
- Author:
- Fabio Simeoni
-
Field Summary
Fields inherited from class org.gcube.common.clients.builders.AbstractBuilder
defaultTimeout -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStatelessBuilder(ProxyPlugin<A, S, P> plugin, EndpointCache<A> cache, Query<A> query, Property<?>... properties) Constructs an instance with a givenProxyPlugin, anEndpointCache, aQuery, and zero or more defaultPropertys. -
Method Summary
Modifier and TypeMethodDescriptionConfigures the address of a given service instance.Configures the address of a given service endpoint.Configures the address of a given service endpoint.Set a configuration property for the proxy.Set a configuration property for the proxy.withTimeout(int duration, TimeUnit unit) Configures the timeout for the proxy.Methods inherited from class org.gcube.common.clients.builders.AbstractBuilder
addProperty, build, contextPath, convertAddress, plugin, setAddress, setQuery, setTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gcube.common.clients.builders.StatelessBuilderAPI.Builder
buildMethods inherited from interface org.gcube.common.clients.builders.StatelessBuilderAPI.FinalClause
buildMethods inherited from interface org.gcube.common.clients.builders.StatelessBuilderAPI.SecondClause
build
-
Constructor Details
-
AbstractStatelessBuilder
protected AbstractStatelessBuilder(ProxyPlugin<A, S, P> plugin, EndpointCache<A> cache, Query<A> query, Property<?>... properties) Constructs an instance with a givenProxyPlugin, anEndpointCache, aQuery, and zero or more defaultPropertys.- Parameters:
plugin- the plugincache- the cachequery- the queryproperties- the properties
-
-
Method Details
-
at
Description copied from interface:StatelessBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatelessBuilderAPI.Builder<A>- Parameters:
host- the host of the endpointport- the port of the endpoint- Returns:
- further configuration options
-
at
Description copied from interface:StatelessBuilderAPI.BuilderConfigures the address of a given service endpoint.- Specified by:
atin interfaceStatelessBuilderAPI.Builder<A>- Parameters:
address- the address of the endpoint- Returns:
- further configuration options
-
at
Description copied from interface:StatelessBuilderAPI.BuilderConfigures the address of a given service endpoint.- Specified by:
atin interfaceStatelessBuilderAPI.Builder<A>- Parameters:
address- the address of the endpoint- Returns:
- further configuration options
-
withTimeout
Description copied from interface:StatelessBuilderAPI.BuilderConfigures the timeout for the proxy.- Specified by:
withTimeoutin interfaceStatelessBuilderAPI.Builder<A>- Specified by:
withTimeoutin interfaceStatelessBuilderAPI.SecondClause<A>- Parameters:
duration- the duration of the timeoutunit- the time unit of the timeout- Returns:
- further configuration options
-
with
Description copied from interface:StatelessBuilderAPI.BuilderSet a configuration property for the proxy.- Specified by:
within interfaceStatelessBuilderAPI.Builder<A>- Parameters:
property- the property- Returns:
- further configuration options
-
with
Description copied from interface:StatelessBuilderAPI.BuilderSet a configuration property for the proxy.- Specified by:
within interfaceStatelessBuilderAPI.Builder<A>- Type Parameters:
T- the type of the property value- Parameters:
name- the name of the propertyvalue- the value of the property- Returns:
- further configuration options
-