Package com.tangosol.config.expression
Class SystemPropertyParameterResolver
- java.lang.Object
-
- com.tangosol.config.expression.SystemPropertyParameterResolver
-
- All Implemented Interfaces:
ParameterResolver
public class SystemPropertyParameterResolver extends Object implements ParameterResolver
ASystemPropertyParameterResolveris aParameterResolverthat is based on property methods onSystem.Replaces {@link com.tangosol.config.expression.PropertiesParameterResolver(java.util.Map)} since it required read and write access for all Properties for simple property access.
resolve(String)only requires read access for property specified.- Since:
- Coherence 12.2.1
- Author:
- jf 2015.04.15
-
-
Field Summary
Fields Modifier and Type Field Description static SystemPropertyParameterResolverINSTANCEThis singleton instance of theSystemPropertyParameterResolver.
-
Constructor Summary
Constructors Constructor Description SystemPropertyParameterResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parameterresolve(String sName)Resolve Coherence system propertysName<T> Tresolve(String sName, Class<T> clzTypeValue)Return property's value as requested type.
-
-
-
Field Detail
-
INSTANCE
public static final SystemPropertyParameterResolver INSTANCE
This singleton instance of theSystemPropertyParameterResolver.
-
-
Method Detail
-
resolve
public Parameter resolve(String sName)
Resolve Coherence system propertysName- Specified by:
resolvein interfaceParameterResolver- Parameters:
sName- system property name- Returns:
- a
Parameterrepresenting the value ofsNameor null if system property not found or if SecurityException was handled.
-
resolve
public <T> T resolve(String sName, Class<T> clzTypeValue)
Return property's value as requested type.- Type Parameters:
T- property value's target type- Parameters:
sName- property nameclzTypeValue- coerce system property's value from string to instance of this class- Returns:
- null if property has no value or return property's value coerced from string
to requested type.
Throws exceptions listed in
Value.as(Class)when coercion fails.
-
-