Class AbstractStatefulBuilder<A,S,P>
- java.lang.Object
-
- org.gcube.common.clients.builders.AbstractBuilder<A,S,P>
-
- org.gcube.common.clients.builders.AbstractStatefulBuilder<A,S,P>
-
- Type Parameters:
A- the type of service addressesS- the type of service stubsP- the type of service proxies
- All Implemented Interfaces:
StatefulBuilderAPI.Builder<A,P>,StatefulBuilderAPI.FinalClause<P>,StatefulBuilderAPI.SecondClause<P>
public abstract class AbstractStatefulBuilder<A,S,P> extends AbstractBuilder<A,S,P> implements StatefulBuilderAPI.Builder<A,P>, StatefulBuilderAPI.SecondClause<P>, StatefulBuilderAPI.FinalClause<P>
Partial implementation of proxy builders for stateful services.- Author:
- Fabio Simeoni
-
-
Field Summary
-
Fields inherited from class org.gcube.common.clients.builders.AbstractBuilder
defaultTimeout
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractStatefulBuilder(ProxyPlugin<A,S,P> plugin, EndpointCache<A> cache, Property<?>... properties)Constructs an instance with a givenProxyPlugin, andEndpointCache, and zero or more defaultPropertys.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatefulBuilderAPI.SecondClause<P>at(jakarta.xml.ws.wsaddressing.W3CEndpointReference address)Configures the address of a given service instance.StatefulBuilderAPI.SecondClause<P>at(String key, String host, int port)Configures the address of a given service instance.StatefulBuilderAPI.SecondClause<P>at(String key, URI address)Configures the address of a given service instance.StatefulBuilderAPI.SecondClause<P>at(String key, URL address)Configures the address of a given service instance.StatefulBuilderAPI.SecondClause<P>matching(Query<A> query)Configures a query for service instances.<T> StatefulBuilderAPI.SecondClause<P>with(String name, T value)Set a configuration property for the proxy.StatefulBuilderAPI.SecondClause<P>with(Property<?> property)Set a configuration property for the proxy.StatefulBuilderAPI.FinalClause<P>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, setTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gcube.common.clients.builders.StatefulBuilderAPI.FinalClause
build
-
Methods inherited from interface org.gcube.common.clients.builders.StatefulBuilderAPI.SecondClause
build
-
-
-
-
Constructor Detail
-
AbstractStatefulBuilder
protected AbstractStatefulBuilder(ProxyPlugin<A,S,P> plugin, EndpointCache<A> cache, Property<?>... properties)
Constructs an instance with a givenProxyPlugin, andEndpointCache, and zero or more defaultPropertys.- Parameters:
plugin- the pluginplugin- the cacheproperties- the properties
-
-
Method Detail
-
matching
public StatefulBuilderAPI.SecondClause<P> matching(Query<A> query)
Description copied from interface:StatefulBuilderAPI.BuilderConfigures a query for service instances.- Specified by:
matchingin interfaceStatefulBuilderAPI.Builder<A,S>- Parameters:
query- the query- Returns:
- further configuration options
-
at
public StatefulBuilderAPI.SecondClause<P> at(jakarta.xml.ws.wsaddressing.W3CEndpointReference address)
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S>- Parameters:
address- the address- Returns:
- further configuration options
-
at
public StatefulBuilderAPI.SecondClause<P> at(String key, String host, int port)
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S>host- the host of the corresponding service endpointport- the port of the corresponding service endpoint- Returns:
- further configuration options
-
at
public StatefulBuilderAPI.SecondClause<P> at(String key, URL address)
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S>- Returns:
- further configuration options
-
at
public StatefulBuilderAPI.SecondClause<P> at(String key, URI address)
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S>- Returns:
- further configuration options
-
withTimeout
public StatefulBuilderAPI.FinalClause<P> withTimeout(int duration, TimeUnit unit)
Description copied from interface:StatefulBuilderAPI.SecondClauseConfigures the timeout for the proxy.- Specified by:
withTimeoutin interfaceStatefulBuilderAPI.SecondClause<A>- Parameters:
duration- the duration of the timeoutunit- the time unit of the timeout- Returns:
- further configuration options
-
with
public StatefulBuilderAPI.SecondClause<P> with(Property<?> property)
Description copied from interface:StatefulBuilderAPI.SecondClauseSet a configuration property for the proxy.- Specified by:
within interfaceStatefulBuilderAPI.SecondClause<A>- Returns:
- further configuration options
-
with
public <T> StatefulBuilderAPI.SecondClause<P> with(String name, T value)
Description copied from interface:StatefulBuilderAPI.SecondClauseSet a configuration property for the proxy.- Specified by:
within interfaceStatefulBuilderAPI.SecondClause<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
-
-