public class DynamicPropertyResolver extends Object implements AliasSelectorResolver
AliasSelectorResolver that uses a Properties object accessed from a InputStream
(likely a resource or file) to translate the alias. The key of each property is the alias, and the value is the
fully-formed selector expression.| Constructor and Description |
|---|
DynamicPropertyResolver() |
DynamicPropertyResolver(InputStream propertyFile) |
| Modifier and Type | Method and Description |
|---|---|
String |
resolveSelector(String aliasSelectorExpression)
The method that translates an alias into a fully-formed selector expression
|
void |
setPropertyFile(InputStream propertyFile)
Defines the InputStream, such as a FileInputStream, that provides access to the Properties object
|
void |
setReloadIntervalSeconds(int reloadIntervalSeconds)
Setting this interval will instruct the resolver to reload the Properties object from the InputStream before
resolving the alias, if the specified number of seconds has elapsed since the last time the Properties object
was loaded.
|
public DynamicPropertyResolver()
public DynamicPropertyResolver(InputStream propertyFile)
public String resolveSelector(String aliasSelectorExpression) throws ParseSelectorException
AliasSelectorResolverresolveSelector in interface AliasSelectorResolveraliasSelectorExpression - the alias expression passed in on the URIParseSelectorException - thrown if the input alias expression is not validpublic void setReloadIntervalSeconds(int reloadIntervalSeconds)
reloadIntervalSeconds - interval in seconds, 0 is defaultpublic void setPropertyFile(InputStream propertyFile)
propertyFile - the input streamCopyright © 2014. All Rights Reserved.