Configurationpublic class JNDIConfiguration extends AbstractConfiguration
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN| Constructor | Description |
|---|---|
JNDIConfiguration() |
Creates a JNDIConfiguration using the default initial context as the
root of the properties.
|
JNDIConfiguration(java.lang.String prefix) |
Creates a JNDIConfiguration using the default initial context, shifted
with the specified prefix, as the root of the properties.
|
JNDIConfiguration(javax.naming.Context context) |
Creates a JNDIConfiguration using the specified initial context as the
root of the properties.
|
JNDIConfiguration(javax.naming.Context context,
java.lang.String prefix) |
Creates a JNDIConfiguration using the specified initial context shifted
by the specified prefix as the root of the properties.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addPropertyDirect(java.lang.String key,
java.lang.Object obj) |
This operation is not supported and will throw an
UnsupportedOperationException.
|
void |
clearProperty(java.lang.String key) |
Removes the specified property.
|
boolean |
containsKey(java.lang.String key) |
Checks whether the specified key is contained in this configuration.
|
javax.naming.Context |
getBaseContext() |
Return the base context with the prefix applied.
|
javax.naming.Context |
getContext() |
Return the initial context used by this configuration.
|
java.util.Iterator<java.lang.String> |
getKeys() |
Returns an iterator with all property keys stored in this configuration.
|
java.util.Iterator<java.lang.String> |
getKeys(java.lang.String prefix) |
Returns an iterator with all property keys starting with the given
prefix.
|
java.lang.String |
getPrefix() |
Returns the prefix.
|
java.lang.Object |
getProperty(java.lang.String key) |
Returns the value of the specified property.
|
boolean |
isEmpty() |
Returns a flag whether this configuration is empty.
|
void |
setContext(javax.naming.Context context) |
Set the initial context of the configuration.
|
void |
setPrefix(java.lang.String prefix) |
Sets the prefix.
|
void |
setProperty(java.lang.String key,
java.lang.Object value) |
This operation is not supported and will throw an
UnsupportedOperationException.
|
addErrorLogListener, addProperty, append, clear, clearPropertyDirect, copy, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getList, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setThrowExceptionOnMissing, subsetaddConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, clone, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEventspublic JNDIConfiguration() throws javax.naming.NamingException
javax.naming.NamingException - thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(java.lang.String prefix) throws javax.naming.NamingException
prefix - the prefixjavax.naming.NamingException - thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(javax.naming.Context context)
context - the initial contextpublic JNDIConfiguration(javax.naming.Context context, java.lang.String prefix)
context - the initial contextprefix - the prefixpublic java.util.Iterator<java.lang.String> getKeys()
public java.util.Iterator<java.lang.String> getKeys(java.lang.String prefix)
getKeys in interface ConfigurationgetKeys in class AbstractConfigurationprefix - the prefixConfiguration.getKeys()public boolean isEmpty()
public void setProperty(java.lang.String key, java.lang.Object value)
This operation is not supported and will throw an UnsupportedOperationException.
setProperty in interface ConfigurationsetProperty in class AbstractConfigurationkey - the keyvalue - the valuejava.lang.UnsupportedOperationExceptionpublic void clearProperty(java.lang.String key)
clearProperty in interface ConfigurationclearProperty in class AbstractConfigurationkey - the key of the property to removepublic boolean containsKey(java.lang.String key)
key - the key to checkpublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix - The prefix to setpublic java.lang.Object getProperty(java.lang.String key)
key - the key of the propertyprotected void addPropertyDirect(java.lang.String key, java.lang.Object obj)
This operation is not supported and will throw an UnsupportedOperationException.
addPropertyDirect in class AbstractConfigurationkey - the keyobj - the valuejava.lang.UnsupportedOperationExceptionpublic javax.naming.Context getBaseContext() throws javax.naming.NamingException
javax.naming.NamingException - if an error occurspublic javax.naming.Context getContext()
public void setContext(javax.naming.Context context)
context - the context