A - the type of service addressesS - the type of service stubspublic abstract class AbstractConfig<A,S> extends Object implements ProxyConfig<A,S>
ProxyConfig.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConfig(ProxyPlugin<A,S,?> plugin)
Creates an instance with a given
ProxyPlugin. |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(Property<?> property)
Adds a custom property to the configuration.
|
<T> void |
addProperty(String name,
T value)
Adds a custom property to the configuration.
|
boolean |
hasProperty(String property)
Returns
true if the configuration includes a given custom property. |
ProxyPlugin<A,S,?> |
plugin()
Returns the
ProxyPlugin. |
<T> T |
property(String property,
Class<T> clazz)
Returns the value of a given custom property.
|
long |
timeout()
Returns the timeout.
|
protected AbstractConfig(ProxyPlugin<A,S,?> plugin)
ProxyPlugin.plugin - the pluginpublic ProxyPlugin<A,S,?> plugin()
ProxyConfigProxyPlugin.plugin in interface ProxyConfig<A,S>public long timeout()
throws IllegalArgumentException
ProxyConfigtimeout in interface ProxyConfig<A,S>IllegalArgumentExceptionpublic <T> void addProperty(String name, T value)
ProxyConfigaddProperty in interface ProxyConfig<A,S>T - the type of the property valuename - the name of the propertyvalue - the value of the propertypublic void addProperty(Property<?> property)
ProxyConfigaddProperty in interface ProxyConfig<A,S>property - the propertypublic boolean hasProperty(String property)
ProxyConfigtrue if the configuration includes a given custom property.hasProperty in interface ProxyConfig<A,S>property - the name of the propertypublic <T> T property(String property, Class<T> clazz) throws IllegalStateException, IllegalArgumentException
ProxyConfigproperty in interface ProxyConfig<A,S>property - the name of the propertyclazz - the type of the property valueIllegalStateException - if the property is not included in the configurationIllegalArgumentException - if the property exists but its value has a different value
* @param Copyright © 2017. All Rights Reserved.