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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.Pbuild()Configures the timeout for the proxy.<T> StatelessBuilderAPI.Builder<P>with(String name, T value)Set a configuration property for the proxy.StatelessBuilderAPI.Builder<P>with(Property<?> property)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 timeouttimeoutUnit- 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 propertyvalue- 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 timeouttimeoutUnit- the time unit of the timeout- Returns:
- further configuration options
-
-