Package org.gcube.common.clients.config
Interface ProxyConfig<A,S>
-
- Type Parameters:
A- the type of service addressesS- the type of service stubs
- All Known Implementing Classes:
AbstractConfig,DiscoveryConfig,EndpointConfig
public interface ProxyConfig<A,S>The configuration of service proxies.- Author:
- Fabio Simeoni
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> voidaddProperty(String name, T value)Adds a custom property to the configuration.voidaddProperty(Property<?> property)Adds a custom property to the configuration.booleanhasProperty(String property)Returnstrueif the configuration includes a given custom property.ProxyPlugin<A,S,?>plugin()Returns theProxyPlugin.<T> Tproperty(String property, Class<T> clazz)Returns the value of a given custom property.longtimeout()Returns the timeout.
-
-
-
Method Detail
-
timeout
long timeout()
Returns the timeout.- Returns:
- the timeout
-
plugin
ProxyPlugin<A,S,?> plugin()
Returns theProxyPlugin.- Returns:
- the plugin
-
addProperty
<T> void addProperty(String name, T value)
Adds a custom property to the configuration.- Type Parameters:
T- the type of the property value- Parameters:
name- the name of the propertyvalue- the value of the property
-
addProperty
void addProperty(Property<?> property)
Adds a custom property to the configuration.- Parameters:
property- the property
-
hasProperty
boolean hasProperty(String property)
Returnstrueif the configuration includes a given custom property.- Parameters:
property- the name of the property- Returns:
-
property
<T> T property(String property, Class<T> clazz) throws IllegalStateException, IllegalArgumentException
Returns the value of a given custom property.- Parameters:
property- the name of the propertyclazz- the type of the property value- Returns:
- the property value
- Throws:
IllegalStateException- if the property is not included in the configurationIllegalArgumentException- if the property exists but its value has a different value * @paramthe type of the property value
-
-