public class JNDIConfiguration extends AbstractConfiguration
Constructor and Description |
---|
JNDIConfiguration()
Creates a JNDIConfiguration using the default initial context as the
root of the properties.
|
JNDIConfiguration(Context context)
Creates a JNDIConfiguration using the specified initial context as the
root of the properties.
|
JNDIConfiguration(Context context,
String prefix)
Creates a JNDIConfiguration using the specified initial context shifted
by the specified prefix as the root of the properties.
|
JNDIConfiguration(String prefix)
Creates a JNDIConfiguration using the default initial context, shifted
with the specified prefix, as the root of the properties.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPropertyDirect(String key,
Object obj)
This operation is not supported and will throw an
UnsupportedOperationException.
|
protected void |
clearPropertyDirect(String key)
Removes the specified property.
|
protected boolean |
containsKeyInternal(String key)
Checks whether the specified key is contained in this configuration.
|
Context |
getBaseContext()
Return the base context with the prefix applied.
|
Context |
getContext()
Return the initial context used by this configuration.
|
protected Iterator<String> |
getKeysInternal()
Returns an iterator with all property keys stored in this configuration.
|
protected Iterator<String> |
getKeysInternal(String prefix)
Returns an iterator with all property keys starting with the given
prefix.
|
String |
getPrefix()
Returns the prefix.
|
protected Object |
getPropertyInternal(String key)
Returns the value of the specified property.
|
protected boolean |
isEmptyInternal()
Returns a flag whether this configuration is empty.
|
void |
setContext(Context context)
Set the initial context of the configuration.
|
void |
setPrefix(String prefix)
Sets the prefix.
|
protected void |
setPropertyInternal(String key,
Object value)
This operation is not supported and will throw an
UnsupportedOperationException.
|
addErrorLogListener, addProperty, addPropertyInternal, append, beginRead, beginWrite, clear, clearInternal, clearProperty, cloneInterpolator, containsKey, copy, endRead, endWrite, get, get, getArray, getArray, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCollection, getCollection, getConfigurationDecoder, getConversionHandler, getDouble, getDouble, getDouble, getEncodedString, getEncodedString, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getKeys, getList, getList, getList, getList, getListDelimiterHandler, getLogger, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getSynchronizer, immutableSubset, initLogger, installInterpolator, interpolate, interpolate, interpolatedConfiguration, isEmpty, isScalarValue, isThrowExceptionOnMissing, lock, setConfigurationDecoder, setConversionHandler, setDefaultLookups, setInterpolator, setListDelimiterHandler, setLogger, setParentInterpolator, setPrefixLookups, setProperty, setSynchronizer, setThrowExceptionOnMissing, size, sizeInternal, subset, unlock
addEventListener, clearErrorListeners, clearEventListeners, clone, copyEventListeners, createErrorEvent, createEvent, fireError, fireEvent, getEventListenerRegistrations, getEventListeners, isDetailEvents, removeEventListener, setDetailEvents
public JNDIConfiguration() throws NamingException
NamingException
- thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(String prefix) throws NamingException
prefix
- the prefixNamingException
- thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(Context context)
context
- the initial contextprotected Iterator<String> getKeysInternal()
getKeysInternal
in class AbstractConfiguration
protected Iterator<String> getKeysInternal(String prefix)
getKeysInternal
in class AbstractConfiguration
prefix
- the prefixprotected boolean isEmptyInternal()
isEmptyInternal
in class AbstractConfiguration
protected void setPropertyInternal(String key, Object value)
This operation is not supported and will throw an UnsupportedOperationException.
setPropertyInternal
in class AbstractConfiguration
key
- the keyvalue
- the valueUnsupportedOperationException
- always thrown as this method is not supportedprotected void clearPropertyDirect(String key)
clearPropertyDirect
in class AbstractConfiguration
key
- the key of the property to removeprotected boolean containsKeyInternal(String key)
containsKeyInternal
in class AbstractConfiguration
key
- the key to checkpublic String getPrefix()
public void setPrefix(String prefix)
prefix
- The prefix to setprotected Object getPropertyInternal(String key)
getPropertyInternal
in class AbstractConfiguration
key
- the key of the propertyprotected void addPropertyDirect(String key, Object obj)
This operation is not supported and will throw an UnsupportedOperationException.
addPropertyDirect
in class AbstractConfiguration
key
- the keyobj
- the valueUnsupportedOperationException
- always thrown as this method is not supportedpublic Context getBaseContext() throws NamingException
NamingException
- if an error occurspublic Context getContext()
public void setContext(Context context)
context
- the contextCopyright © 2001–2018 The Apache Software Foundation. All rights reserved.