org.gcube.common.clients.builders
Interface StatelessBuilderAPI.Builder<P>

Type Parameters:
P - the type of service proxies
All Known Implementing Classes:
AbstractStatelessBuilder
Enclosing class:
StatelessBuilderAPI

public static interface StatelessBuilderAPI.Builder<P>

The first clause of the DSL.

Author:
Fabio Simeoni

Method Summary
 StatelessBuilderAPI.SecondClause<P> at(String host, int port)
          Configures the address of a given service instance.
 StatelessBuilderAPI.SecondClause<P> at(URI address)
          Configures the address of a given service endpoint.
 StatelessBuilderAPI.SecondClause<P> at(URL address)
          Configures the address of a given service endpoint.
 P build()
          Configures the timeout for the proxy.
 StatelessBuilderAPI.Builder<P> with(Property<?> property)
          Set a configuration property for the proxy.
<T> StatelessBuilderAPI.Builder<P>
with(String name, T value)
          Set a configuration property for the proxy.
 StatelessBuilderAPI.FinalClause<P> withTimeout(int timeoutDuration, TimeUnit timeoutUnit)
          Configures the timeout for the proxy.
 

Method Detail

at

StatelessBuilderAPI.SecondClause<P> at(String host,
                                       int port)
                                       throws IllegalArgumentException
Configures the address of a given service instance.

Parameters:
address - the address of the corresponding service endpoint
Returns:
further configuration options
Throws:
IllegalArgumentException - if the address is invalid

at

StatelessBuilderAPI.SecondClause<P> at(URL address)
                                       throws IllegalArgumentException
Configures the address of a given service endpoint.

Parameters:
address - the address of the endpoint
Returns:
further configuration options
Throws:
IllegalArgumentException - if the address is invalid

at

StatelessBuilderAPI.SecondClause<P> at(URI address)
                                       throws IllegalArgumentException
Configures the address of a given service endpoint.

Parameters:
address - the address of the endpoint
Returns:
further configuration options
Throws:
IllegalArgumentException - if the address is invalid

withTimeout

StatelessBuilderAPI.FinalClause<P> withTimeout(int timeoutDuration,
                                               TimeUnit timeoutUnit)
Configures the timeout for the proxy.

Parameters:
timeoutDuration - the duration of the timeout
timeoutUnit - the time unit of the timeout
Returns:
further configuration options

with

<T> StatelessBuilderAPI.Builder<P> with(String name,
                                        T value)
Set a configuration property for the proxy.

Type Parameters:
T - the type of the property value
Parameters:
name - the name of the property
value - the value of the property
Returns:
further configuration options

with

StatelessBuilderAPI.Builder<P> with(Property<?> property)
Set a configuration property for the proxy.

Parameters:
name - the property
Returns:
further configuration options

build

P build()
Configures the timeout for the proxy.

Parameters:
timeoutDuration - the duration of the timeout
timeoutUnit - the time unit of the timeout
Returns:
further configuration options


Copyright © 2013. All Rights Reserved.