Class Session.SessionImpl

java.lang.Object
com.northconcepts.datapipeline.core.Session.SessionImpl
All Implemented Interfaces:
Session
Enclosing interface:
Session

public static class Session.SessionImpl extends Object implements Session
Stores session properties in a lazily created map, keyed by property name, class name, or both.
  • Constructor Details

    • SessionImpl

      public SessionImpl()
  • Method Details

    • keySet

      public Set<String> keySet()
      Description copied from interface: Session
      Returns the set of all session property keys.
      Specified by:
      keySet in interface Session
      Returns:
      the set of property keys, never null
    • containsSessionProperty

      public <T> boolean containsSessionProperty(Class<T> type, String name)
      Description copied from interface: Session
      Returns true if a session property exists for the given type and name combination.
      Specified by:
      containsSessionProperty in interface Session
      Type Parameters:
      T - the type used as part of the property key
      Parameters:
      type - the class used as part of the property key, or null to match by name only
      name - the property name, or null to match by type only
      Returns:
      true if the property exists
    • containsSessionProperty

      public <T> boolean containsSessionProperty(Class<T> type)
      Description copied from interface: Session
      Returns true if a session property exists for the given type.
      Specified by:
      containsSessionProperty in interface Session
      Type Parameters:
      T - the type used as the property key
      Parameters:
      type - the class used as the property key
      Returns:
      true if the property exists
    • containsSessionProperty

      public boolean containsSessionProperty(String name)
      Description copied from interface: Session
      Returns true if a session property exists with the given name.
      Specified by:
      containsSessionProperty in interface Session
      Parameters:
      name - the property name
      Returns:
      true if the property exists
    • getSessionProperty

      public <T> T getSessionProperty(Class<T> type, String name)
      Description copied from interface: Session
      Returns the session property value associated with the given type and name combination.
      Specified by:
      getSessionProperty in interface Session
      Type Parameters:
      T - the expected value type
      Parameters:
      type - the class used as part of the property key, or null to match by name only
      name - the property name, or null to match by type only
      Returns:
      the property value, or null if not found
    • getSessionProperty

      public <T> T getSessionProperty(Class<T> type)
      Description copied from interface: Session
      Returns the session property value associated with the given type.
      Specified by:
      getSessionProperty in interface Session
      Type Parameters:
      T - the expected value type
      Parameters:
      type - the class used as the property key
      Returns:
      the property value, or null if not found
    • getSessionProperty

      public <T> T getSessionProperty(String name)
      Description copied from interface: Session
      Returns the session property value associated with the given name.
      Specified by:
      getSessionProperty in interface Session
      Type Parameters:
      T - the expected value type
      Parameters:
      name - the property name
      Returns:
      the property value, or null if not found
    • setSessionProperty

      public <T> void setSessionProperty(Class<T> type, String name, Object value)
      Description copied from interface: Session
      Sets a session property value keyed by the given type and name combination.
      Specified by:
      setSessionProperty in interface Session
      Type Parameters:
      T - the type used as part of the property key
      Parameters:
      type - the class used as part of the property key, or null to match by name only
      name - the property name, or null to match by type only
      value - the value to store
    • setSessionProperty

      public <T> void setSessionProperty(Class<T> type, Object value)
      Description copied from interface: Session
      Sets a session property value keyed by type.
      Specified by:
      setSessionProperty in interface Session
      Type Parameters:
      T - the type used as the property key
      Parameters:
      type - the class used as the property key
      value - the value to store
    • setSessionProperty

      public void setSessionProperty(String name, Object value)
      Description copied from interface: Session
      Sets a session property value keyed by name.
      Specified by:
      setSessionProperty in interface Session
      Parameters:
      name - the property name
      value - the value to store
    • copySessionPropertiesFrom

      public void copySessionPropertiesFrom(Session session)
      Description copied from interface: Session
      Copies all session properties from the given source session into this one.
      Specified by:
      copySessionPropertiesFrom in interface Session
      Parameters:
      session - the source session to copy from, may be null
    • removeSessionProperties

      public void removeSessionProperties()
      Description copied from interface: Session
      Removes all session properties from this session.
      Specified by:
      removeSessionProperties in interface Session