public class URLConfigurationSource extends java.lang.Object implements PolledConfigurationSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_URL
System property name to define a set of URLs to be used by the
default constructor.
|
static java.lang.String |
DEFAULT_CONFIG_FILE_FROM_CLASSPATH |
static java.lang.String |
DEFAULT_CONFIG_FILE_NAME
Default configuration file name to be used by default constructor.
|
Constructor and Description |
---|
URLConfigurationSource()
Create the instance for the default list of URLs, which is composed by the following order
A configuration file (default name to be
config.properties , see DEFAULT_CONFIG_FILE_NAME ) on the classpath
A list of URLs defined by system property "archaius.configurationSource.additionalUrls" with values separated by comma "," . |
URLConfigurationSource(java.lang.String... urls)
Create an instance with a list URLs to be used.
|
URLConfigurationSource(java.net.URL... urls)
Create an instance with a list URLs to be used.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.net.URL> |
getConfigUrls() |
PollResult |
poll(boolean initial,
java.lang.Object checkPoint)
Retrieve the content of the property files.
|
java.lang.String |
toString() |
public static final java.lang.String CONFIG_URL
public static final java.lang.String DEFAULT_CONFIG_FILE_NAME
configurationSource.defaultFileName
public static final java.lang.String DEFAULT_CONFIG_FILE_FROM_CLASSPATH
public URLConfigurationSource(java.lang.String... urls)
urls
- list of URLs to be usedpublic URLConfigurationSource(java.net.URL... urls)
urls
- list of URLs to be usedpublic URLConfigurationSource()
config.properties
, see DEFAULT_CONFIG_FILE_NAME
) on the classpath
","
.
public java.util.List<java.net.URL> getConfigUrls()
public PollResult poll(boolean initial, java.lang.Object checkPoint) throws java.io.IOException
poll
in interface PolledConfigurationSource
initial
- this parameter is ignored by the implementationcheckPoint
- this parameter is ignored by the implementationjava.io.IOException
- IOException occurred in file operationpublic java.lang.String toString()
toString
in class java.lang.Object