|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.clients.config.AbstractConfig<A,S>
A - the type of service addressesS - the type of service stubspublic abstract class AbstractConfig<A,S>
Partial implementation of ProxyConfig.
| Constructor Summary | |
|---|---|
protected |
AbstractConfig(ProxyPlugin<A,S,?> plugin)
Creates an instance with a given ProxyPlugin. |
| Method Summary | ||
|---|---|---|
void |
addProperty(Property<?> property)
Adds a custom property to the configuration. |
|
|
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. |
|
|
property(String property,
Class<T> clazz)
Returns the value of a given custom property. |
|
long |
timeout()
Returns the timeout. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractConfig(ProxyPlugin<A,S,?> plugin)
ProxyPlugin.
plugin - the plugin| Method Detail |
|---|
public ProxyPlugin<A,S,?> plugin()
ProxyConfigProxyPlugin.
plugin in interface ProxyConfig<A,S>
public long timeout()
throws IllegalArgumentException
ProxyConfig
timeout in interface ProxyConfig<A,S>IllegalArgumentException
public <T> void addProperty(String name,
T value)
ProxyConfig
addProperty 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)
ProxyConfig
addProperty 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 property
public <T> T property(String property,
Class<T> clazz)
throws IllegalStateException,
IllegalArgumentException
ProxyConfig
property in interface ProxyConfig<A,S>property - the name of the propertyclazz - the type of the property value
IllegalStateException - if the property is not included in the configuration
IllegalArgumentException - if the property exists but its value has a different value
* @param
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||