public class ServletConfigService extends java.lang.Object implements ConfigService
AppContext
within the servlet itself
after any caching ConfigService
s and once the ServletConfig
is available.Constructor and Description |
---|
ServletConfigService(ServletConfig c,
AppContext conn) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ConfigServiceListener listener)
register a ConfigServiceListener
|
void |
cleanup()
AppContext is being closed. |
void |
clearServiceProperties()
clear any cached properties.
|
AppContext |
getContext() |
java.util.Properties |
getServiceProperties()
return the set of properties defined by the service
|
java.lang.Class<? super ConfigService> |
getType()
Returns the type of service the class should be registered under.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Set a property
This method is for making persistent changes to the configuration.
|
public ServletConfigService(ServletConfig c, AppContext conn)
public void clearServiceProperties()
ConfigService
clearServiceProperties
in interface ConfigService
public java.util.Properties getServiceProperties()
ConfigService
getServiceProperties
in interface ConfigService
public AppContext getContext()
getContext
in interface Contexed
public void setProperty(java.lang.String name, java.lang.String value) throws java.lang.UnsupportedOperationException
ConfigService
UnsupportedOperationException
setProperty
in interface ConfigService
java.lang.UnsupportedOperationException
public void cleanup()
AppContextCleanup
AppContext
is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup
in interface AppContextCleanup
public void addListener(ConfigServiceListener listener)
ConfigService
addListener
in interface ConfigService
public java.lang.Class<? super ConfigService> getType()
AppContextService
getType
in interface AppContextService<ConfigService>