Class Session.SessionImpl
java.lang.Object
com.northconcepts.datapipeline.core.Session.SessionImpl
- All Implemented Interfaces:
Session
- Enclosing interface:
Session
Stores session properties in a lazily created map, keyed by property name, class name, or both.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.northconcepts.datapipeline.core.Session
Session.SessionImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> booleancontainsSessionProperty(Class<T> type) Returnstrueif a session property exists for the given type.<T> booleancontainsSessionProperty(Class<T> type, String name) Returnstrueif a session property exists for the given type and name combination.booleanReturnstrueif a session property exists with the given name.voidcopySessionPropertiesFrom(Session session) Copies all session properties from the given source session into this one.<T> TgetSessionProperty(Class<T> type) Returns the session property value associated with the given type.<T> TgetSessionProperty(Class<T> type, String name) Returns the session property value associated with the given type and name combination.<T> TgetSessionProperty(String name) Returns the session property value associated with the given name.keySet()Returns the set of all session property keys.voidRemoves all session properties from this session.<T> voidsetSessionProperty(Class<T> type, Object value) Sets a session property value keyed by type.<T> voidsetSessionProperty(Class<T> type, String name, Object value) Sets a session property value keyed by the given type and name combination.voidsetSessionProperty(String name, Object value) Sets a session property value keyed by name.
-
Constructor Details
-
SessionImpl
public SessionImpl()
-
-
Method Details
-
keySet
Description copied from interface:SessionReturns the set of all session property keys. -
containsSessionProperty
Description copied from interface:SessionReturnstrueif a session property exists for the given type and name combination.- Specified by:
containsSessionPropertyin interfaceSession- Type Parameters:
T- the type used as part of the property key- Parameters:
type- the class used as part of the property key, ornullto match by name onlyname- the property name, ornullto match by type only- Returns:
trueif the property exists
-
containsSessionProperty
Description copied from interface:SessionReturnstrueif a session property exists for the given type.- Specified by:
containsSessionPropertyin interfaceSession- Type Parameters:
T- the type used as the property key- Parameters:
type- the class used as the property key- Returns:
trueif the property exists
-
containsSessionProperty
Description copied from interface:SessionReturnstrueif a session property exists with the given name.- Specified by:
containsSessionPropertyin interfaceSession- Parameters:
name- the property name- Returns:
trueif the property exists
-
getSessionProperty
Description copied from interface:SessionReturns the session property value associated with the given type and name combination.- Specified by:
getSessionPropertyin interfaceSession- Type Parameters:
T- the expected value type- Parameters:
type- the class used as part of the property key, ornullto match by name onlyname- the property name, ornullto match by type only- Returns:
- the property value, or
nullif not found
-
getSessionProperty
Description copied from interface:SessionReturns the session property value associated with the given type.- Specified by:
getSessionPropertyin interfaceSession- Type Parameters:
T- the expected value type- Parameters:
type- the class used as the property key- Returns:
- the property value, or
nullif not found
-
getSessionProperty
Description copied from interface:SessionReturns the session property value associated with the given name.- Specified by:
getSessionPropertyin interfaceSession- Type Parameters:
T- the expected value type- Parameters:
name- the property name- Returns:
- the property value, or
nullif not found
-
setSessionProperty
Description copied from interface:SessionSets a session property value keyed by the given type and name combination.- Specified by:
setSessionPropertyin interfaceSession- Type Parameters:
T- the type used as part of the property key- Parameters:
type- the class used as part of the property key, ornullto match by name onlyname- the property name, ornullto match by type onlyvalue- the value to store
-
setSessionProperty
Description copied from interface:SessionSets a session property value keyed by type.- Specified by:
setSessionPropertyin interfaceSession- Type Parameters:
T- the type used as the property key- Parameters:
type- the class used as the property keyvalue- the value to store
-
setSessionProperty
Description copied from interface:SessionSets a session property value keyed by name.- Specified by:
setSessionPropertyin interfaceSession- Parameters:
name- the property namevalue- the value to store
-
copySessionPropertiesFrom
Description copied from interface:SessionCopies all session properties from the given source session into this one.- Specified by:
copySessionPropertiesFromin interfaceSession- Parameters:
session- the source session to copy from, may benull
-
removeSessionProperties
public void removeSessionProperties()Description copied from interface:SessionRemoves all session properties from this session.- Specified by:
removeSessionPropertiesin interfaceSession
-