Class AbstractBuilder<A,S,P>
java.lang.Object
org.gcube.common.clients.builders.AbstractBuilder<A,S,P>
- Type Parameters:
A- the type of service addressesS- the type of service stubsP- the type of service proxies
- Direct Known Subclasses:
AbstractSingletonBuilder,AbstractStatefulBuilder,AbstractStatelessBuilder
Partial implementation of proxy builders.
- Author:
- Fabio Simeoni
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBuilder(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 TypeMethodDescriptionprotected voidaddProperty(Property<?> property) Adds a custom property.build()Builds the proxy.protected abstract StringReturns the context path of the service.protected abstract AconvertAddress(jakarta.xml.ws.wsaddressing.W3CEndpointReference address) Converts aW3CEndpointReferencein a service address.protected ProxyPlugin<A,S, P> plugin()Returns theProxyPlugin.protected voidsetAddress(jakarta.xml.ws.wsaddressing.W3CEndpointReference address) Sets the address.protected voidSets the query.protected voidsetTimeout(int timeout) Sets the timeout.
-
Field Details
-
defaultTimeout
public static final int defaultTimeoutDefault proxy timeout.
-
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder(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
-
plugin
Returns theProxyPlugin.- Returns:
- the plugin
-
setQuery
Sets the query.- Parameters:
query- the query
-
setTimeout
protected void setTimeout(int timeout) Sets the timeout.- Parameters:
timeout- the timout
-
setAddress
protected void setAddress(jakarta.xml.ws.wsaddressing.W3CEndpointReference address) Sets the address.- Parameters:
address- the address
-
addProperty
Adds a custom property.- Parameters:
property- the property
-
build
Builds the proxy.- Returns:
- the proxy
-
convertAddress
Converts aW3CEndpointReferencein a service address.- Parameters:
address- the address as aW3CEndpointReference- Returns:
- the converted address
-
contextPath
Returns the context path of the service.- Returns:
- the context path
-