java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.spi.ConfigurationWatchList
- All Implemented Interfaces:
ContextAware
This class manages the list of files and/or urls that are watched for changes.
- Author:
- Ceki Gülcü
-
Field Summary
FieldsFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToWatchList(URL url) Add the url but only if it is file:// or http(s)://Deprecated.Has a changed been detected in one of the files being watched?voidclear()booleanReturns the fileWatchList field as a StringReturns the urlWatchList field as a StringbooleanReturns true if there are watchable files, false otherwise.static booleanisWatchableProtocol(String protocolStr) Is the given protocol a protocol that we can watch for.static booleanisWatchableProtocol(URL url) Is protocol for the given URL a protocol that we can watch for.voidsetMainURL(URL mainURL) The mainURL for the configuration file.booleanMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
HTTPS_PROTOCOL_STR
- See Also:
-
HTTP_PROTOCOL_STR
- See Also:
-
FILE_PROTOCOL_STR
- See Also:
-
-
Constructor Details
-
ConfigurationWatchList
public ConfigurationWatchList()
-
-
Method Details
-
buildClone
-
clear
-
setMainURL
The mainURL for the configuration file. Null values are allowed.- Parameters:
mainURL-
-
watchPredicateFulfilled
-
addToWatchList
Add the url but only if it is file:// or http(s)://- Parameters:
url- should be a file or http(s)
-
getMainURL
-
getCopyOfFileWatchList
-
emptyWatchLists
-
changeDetected
Deprecated.replaced bychangeDetectedInFile() -
changeDetectedInFile
Has a changed been detected in one of the files being watched?- Returns:
-
changeDetectedInURL
-
hasAtLeastOneWatchableFile
Returns true if there are watchable files, false otherwise.- Returns:
- true if there are watchable files, false otherwise.
- Since:
- 1.5.8
-
isWatchableProtocol
Is protocol for the given URL a protocol that we can watch for.- Parameters:
url-- Returns:
- true if watchable, false otherwise
- Since:
- 1.5.9
-
isWatchableProtocol
Is the given protocol a protocol that we can watch for.- Parameters:
protocolStr-- Returns:
- true if watchable, false otherwise
- Since:
- 1.5.9
-
getUrlWatchListAsStr
Returns the urlWatchList field as a String- Returns:
- the urlWatchList field as a String
- Since:
- 1.5.19
-
getFileWatchListAsStr
Returns the fileWatchList field as a String- Returns:
- the fileWatchList field as a String
- Since:
- 1.5.19
-
changeDetectedInFile()