java.util.EventListener, org.eclipse.jetty.util.PathWatcher.Listenerpublic class PropertyUserStore
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements org.eclipse.jetty.util.PathWatcher.Listener
This class monitors a property file of the format mentioned below and notifies registered listeners of the changes to the the given file.
username: password [,rolename ...]Passwords may be clear text, obfuscated or checksummed. The class com.eclipse.Util.Password should be used to generate obfuscated passwords or password checksums. If DIGEST Authentication is used, the password must be in a recoverable format, either plain text or OBF:.
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
PropertyUserStore.UserListener |
UserListener
|
| Constructor | Description |
|---|---|
PropertyUserStore() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doStart() |
Depending on the value of the refresh interval, this method will either start up a scanner thread that will monitor the properties file for changes after
it has initially loaded it.
|
protected void |
doStop() |
|
java.lang.String |
getConfig() |
Deprecated.
use
getConfigPath() instead |
java.nio.file.Path |
getConfigPath() |
Get the Config
Path reference. |
org.eclipse.jetty.util.resource.Resource |
getConfigResource() |
|
int |
getRefreshInterval() |
Deprecated.
use
isHotReload() instead |
UserIdentity |
getUserIdentity(java.lang.String userName) |
|
boolean |
isHotReload() |
Is hot reload enabled on this user store
|
void |
onPathWatchEvent(org.eclipse.jetty.util.PathWatcher.PathWatchEvent event) |
|
void |
registerUserListener(PropertyUserStore.UserListener listener) |
registers a listener to be notified of the contents of the property file
|
void |
setConfig(java.lang.String config) |
Set the Config Path from a String reference to a file
|
void |
setConfigPath(java.io.File configFile) |
Set the Config Path from a
File reference |
void |
setConfigPath(java.lang.String configFile) |
Set the Config Path from a String reference to a file
|
void |
setConfigPath(java.nio.file.Path configPath) |
Set the Config Path
|
void |
setHotReload(boolean enable) |
Enable Hot Reload of the Property File
|
void |
setRefreshInterval(int sec) |
Deprecated.
use
setHotReload(boolean) instead |
java.lang.String |
toString() |
@Deprecated public java.lang.String getConfig()
getConfigPath() insteadpublic void setConfig(java.lang.String config)
config - the config filepublic java.nio.file.Path getConfigPath()
Path reference.public void setConfigPath(java.lang.String configFile)
configFile - the config filepublic void setConfigPath(java.io.File configFile)
File referenceconfigFile - the config filepublic void setConfigPath(java.nio.file.Path configPath)
configPath - the config pathpublic UserIdentity getUserIdentity(java.lang.String userName)
public org.eclipse.jetty.util.resource.Resource getConfigResource()
throws java.io.IOException
java.io.IOException - if unable to get the resourcepublic boolean isHotReload()
public void setHotReload(boolean enable)
enable - true to enable, false to disable@Deprecated public void setRefreshInterval(int sec)
setHotReload(boolean) insteadsec - the refresh interval@Deprecated public int getRefreshInterval()
isHotReload() insteadpublic java.lang.String toString()
toString in class java.lang.Objectprotected void doStart()
throws java.lang.Exception
doStart in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.ExceptionAbstractLifeCycle.doStart()public void onPathWatchEvent(org.eclipse.jetty.util.PathWatcher.PathWatchEvent event)
onPathWatchEvent in interface org.eclipse.jetty.util.PathWatcher.Listenerprotected void doStop()
throws java.lang.Exception
doStop in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.ExceptionAbstractLifeCycle.doStop()public void registerUserListener(PropertyUserStore.UserListener listener)
listener - the user listenerCopyright © 1995–2018 Webtide. All rights reserved.