public class RequestScope extends AbstractMapBasedScope implements IRequestScope
m_aRWLockm_aAttrs| Constructor and Description |
|---|
RequestScope(String sScopeID,
String sSessionID) |
| Modifier and Type | Method and Description |
|---|---|
ICommonsList<String> |
getAttributeAsList(String sName,
ICommonsList<String> aDefault)
Get a list of all attribute values with the same name.
|
protected ICommonsList<String> |
getAttributeAsListCustom(String sName,
Object aValue,
ICommonsList<String> aDefault)
Try to convert the passed value into a
ICommonsList of
String. |
String |
getSessionID(boolean bCreateIfNotExisting) |
void |
initScope()
Init the scope.
|
protected void |
postDestroy()
Override this method to perform further actions AFTER the scope was
destroyed.
|
protected void |
preDestroy()
Override this method to perform further actions BEFORE the scope is
destroyed.
|
String |
toString() |
destroyOwnedScopes, destroyScope, equals, getAllScopeRenewalAwareAttributes, getID, hashCode, isDestroyed, isInDestruction, isInPreDestruction, isValid, runAtomic, runAtomicgetCloneclear, onBeforeRemoveAllAttributes, onBeforeRemoveAttribute, onBeforeSetAttributeValue, removeAttribute, setAttribute, setAttributes, setAttributescontainsAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeCount, getAttributeObject, getIterator, isEmptyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributeAsList, getSessionID, hasAttributeValue, hasAttributeValuedestroyScope, getAllScopeRenewalAwareAttributes, getID, isDestroyed, isInDestruction, isValid, runAtomic, runAtomicgetAndSetAttributeFlag, setAttribute, setAttribute, setAttribute, setAttributeremoveAttribute, setAttribute, setAttributes, setAttributescontainsAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getAttributeCount, getAttributeObject, getCastedAttribute, getCastedAttribute, getIterator, getTypedAttribute, getTypedAttribute, isEmpty, isNotEmptycleargetComparatorID@Nonnull @Nonempty public final String getSessionID(boolean bCreateIfNotExisting)
getSessionID in interface IRequestScopebCreateIfNotExisting - if true a session ID is created if needednull if no session ID is present and no session should
be created.public void initScope()
IScopeprotected void preDestroy()
AbstractMapBasedScopepreDestroy in class AbstractMapBasedScopeprotected void postDestroy()
AbstractMapBasedScopepostDestroy in class AbstractMapBasedScope@Nullable @OverrideOnDemand protected ICommonsList<String> getAttributeAsListCustom(@Nullable String sName, @Nonnull Object aValue, @Nullable ICommonsList<String> aDefault)
ICommonsList of
String. This method is only called, if the passed value is non-
null, if it is not an String array or a single String.sName - The name of the parameter to be queried. Just for informational
purposes.aValue - The retrieved non-null attribute value which is neither
a String nor a String array.aDefault - The default value to be returned, in case no type conversion could
be found.@Nullable public ICommonsList<String> getAttributeAsList(@Nullable String sName, @Nullable ICommonsList<String> aDefault)
IRequestScopegetAttributeAsList in interface IRequestScopesName - The name of the attribute to query.aDefault - The default value to be returned, if no such attribute is present.aDefault if no such attribute value existspublic String toString()
toString in class AbstractMapBasedScopeCopyright © 2014–2016 Philip Helger. All rights reserved.