|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.clients.builders.AbstractBuilder<A,S,P>
org.gcube.common.clients.builders.AbstractSingletonBuilder<A,S,P>
A - the type of service addressesS - the type of service stubsP - the type of service proxiespublic abstract class AbstractSingletonBuilder<A,S,P>
Partial implementation of proxy builders for singleton services, i.e. stateful services with a known single instance.
| Field Summary |
|---|
| Fields inherited from class org.gcube.common.clients.builders.AbstractBuilder |
|---|
defaultTimeout |
| Constructor Summary | |
|---|---|
protected |
AbstractSingletonBuilder(ProxyPlugin<A,S,P> plugin,
EndpointCache<A> cache,
Property<?>... properties)
Constructs an instance with a given ProxyPlugin, and EndpointCache, and zero or more default Propertys. |
| Method Summary | ||
|---|---|---|
SingletonBuilderAPI.SecondClause<P> |
at(String host,
int port)
Configures the address of a given service instance. |
|
SingletonBuilderAPI.SecondClause<P> |
at(URI address)
Configures the address of a given service endpoint. |
|
SingletonBuilderAPI.SecondClause<P> |
at(URL address)
Configures the address of a given service endpoint. |
|
SingletonBuilderAPI.SecondClause<P> |
matching(Query<A> query)
Configures a query for service instances. |
|
SingletonBuilderAPI.SecondClause<P> |
with(Property<?> property)
Set a configuration property for the proxy. |
|
|
with(String name,
T value)
Set a configuration property for the proxy. |
|
SingletonBuilderAPI.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.SingletonBuilderAPI.SecondClause |
|---|
build |
| Methods inherited from interface org.gcube.common.clients.builders.SingletonBuilderAPI.FinalClause |
|---|
build |
| Constructor Detail |
|---|
protected AbstractSingletonBuilder(ProxyPlugin<A,S,P> plugin,
EndpointCache<A> cache,
Property<?>... properties)
ProxyPlugin, and EndpointCache, and zero or more default Propertys.
plugin - the pluginplugin - the cacheproperties - the properties| Method Detail |
|---|
public SingletonBuilderAPI.SecondClause<P> matching(Query<A> query)
SingletonBuilderAPI.Builder
matching in interface SingletonBuilderAPI.Builder<A,P>query - the query
public SingletonBuilderAPI.SecondClause<P> at(String host,
int port)
SingletonBuilderAPI.Builder
at in interface SingletonBuilderAPI.Builder<A,P>public SingletonBuilderAPI.SecondClause<P> at(URL address)
SingletonBuilderAPI.Builder
at in interface SingletonBuilderAPI.Builder<A,P>address - the address of the endpoint
public SingletonBuilderAPI.SecondClause<P> at(URI address)
SingletonBuilderAPI.Builder
at in interface SingletonBuilderAPI.Builder<A,P>address - the address of the endpoint
public SingletonBuilderAPI.FinalClause<P> withTimeout(int duration,
TimeUnit unit)
SingletonBuilderAPI.SecondClause
withTimeout in interface SingletonBuilderAPI.SecondClause<P>duration - the duration of the timeoutunit - the time unit of the timeout
public SingletonBuilderAPI.SecondClause<P> with(Property<?> property)
SingletonBuilderAPI.SecondClause
with in interface SingletonBuilderAPI.SecondClause<P>
public <T> SingletonBuilderAPI.SecondClause<P> with(String name,
T value)
SingletonBuilderAPI.SecondClause
with in interface SingletonBuilderAPI.SecondClause<P>T - the type of the property valuename - the name of the propertyvalue - the value of the property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||