public class ServletConfiguration extends AbstractConfiguration
ServletConfig. This configuration is read only, adding or removing a
property will throw an UnsupportedOperationException.| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.ServletConfig |
config
Stores a reference to the wrapped
ServletConfig. |
| Constructor and Description |
|---|
ServletConfiguration(javax.servlet.Servlet servlet)
Creates a ServletConfiguration using the initialization parameter of the specified servlet.
|
ServletConfiguration(javax.servlet.ServletConfig config)
Creates a ServletConfiguration using the servlet initialization parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPropertyDirect(String key,
Object obj)
Adds a property to this configuration.
|
protected void |
clearPropertyDirect(String key)
Removes the property with the given key.
|
protected boolean |
containsKeyInternal(String key)
Checks whether the specified key is stored in this configuration.
|
protected Iterator<String> |
getKeysInternal()
Actually creates an iterator for iterating over the keys in this configuration.
|
protected Object |
getPropertyInternal(String key)
Actually obtains the value of the specified property.
|
protected Object |
handleDelimiters(Object value)
Takes care of list delimiters in property values.
|
protected boolean |
isEmptyInternal()
Checks if this configuration is empty.
|
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, getDuration, getDuration, getEncodedString, getEncodedString, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getKeys, getKeysInternal, 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, setPropertyInternal, setSynchronizer, setThrowExceptionOnMissing, size, sizeInternal, subset, unlockaddEventListener, clearErrorListeners, clearEventListeners, clone, copyEventListeners, createErrorEvent, createEvent, fireError, fireEvent, getEventListenerRegistrations, getEventListeners, isDetailEvents, removeEventListener, setDetailEventsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEnum, getEnumprotected javax.servlet.ServletConfig config
ServletConfig.public ServletConfiguration(javax.servlet.Servlet servlet)
servlet - the servletpublic ServletConfiguration(javax.servlet.ServletConfig config)
config - the servlet configurationprotected Object getPropertyInternal(String key)
AbstractConfigurationgetProperty(). Concrete
subclasses must define it to fetch the value of the desired property.getPropertyInternal in class AbstractConfigurationkey - the key of the property in questionprotected Iterator<String> getKeysInternal()
AbstractConfigurationgetKeys(), it has to be defined by concrete subclasses.getKeysInternal in class AbstractConfigurationIterator with all property keys in this configurationprotected boolean isEmptyInternal()
getKeys() method (which must be
defined by concrete sub classes) to find out whether properties exist.isEmptyInternal in class AbstractConfigurationprotected boolean containsKeyInternal(String key)
containsKeyInternal in class AbstractConfigurationkey - the keyprotected void clearPropertyDirect(String key)
clearPropertyDirect in class AbstractConfigurationkey - the key of the property to be removedUnsupportedOperationException - because this operation is not allowedprotected void addPropertyDirect(String key, Object obj)
addPropertyDirect in class AbstractConfigurationkey - the key of the propertyobj - the value to be addedUnsupportedOperationException - because this operation is not allowedprotected Object handleDelimiters(Object value)
value - the property value to be examinedCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.