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
ConstructorsModifierConstructorDescriptionprotectedAbstractStatefulBuilder(ProxyPlugin<A, S, P> plugin, EndpointCache<A> cache, Property<?>... properties) Constructs an instance with a givenProxyPlugin, andEndpointCache, and zero or more defaultPropertys. -
Method Summary
Modifier and TypeMethodDescriptionat(jakarta.xml.ws.wsaddressing.W3CEndpointReference address) Configures the address of a given service instance.Configures the address of a given service instance.Configures the address of a given service instance.Configures the address of a given service instance.Configures a query for service instances.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.StatefulBuilderAPI.FinalClause
buildMethods inherited from interface org.gcube.common.clients.builders.StatefulBuilderAPI.SecondClause
build
-
Constructor Details
-
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 plugincache- the cacheproperties- the properties
-
-
Method Details
-
matching
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
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S> - Parameters:
key- the key of the instancehost- the host of the corresponding service endpointport- the port of the corresponding service endpoint- Returns:
- further configuration options
-
at
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S> - Parameters:
key- the key of the instanceaddress- the address of the corresponding service endpoint- Returns:
- further configuration options
-
at
Description copied from interface:StatefulBuilderAPI.BuilderConfigures the address of a given service instance.- Specified by:
atin interfaceStatefulBuilderAPI.Builder<A,S> - Parameters:
key- the key of the instanceaddress- the address of the corresponding service endpoint- Returns:
- further configuration options
-
withTimeout
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
Description copied from interface:StatefulBuilderAPI.SecondClauseSet a configuration property for the proxy.- Specified by:
within interfaceStatefulBuilderAPI.SecondClause<A>- Parameters:
property- the property- Returns:
- further configuration options
-
with
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
-