Class AbstractSession

java.lang.Object
step.functions.io.AbstractSession
All Implemented Interfaces:
Closeable, AutoCloseable

public class AbstractSession extends Object implements Closeable
  • Field Details

  • Constructor Details

    • AbstractSession

      public AbstractSession()
  • Method Details

    • get

      public Object get(String arg0)
    • getOrDefault

      public <T> T getOrDefault(String key, T def)
      Get a value from the sessionObject. If the value does not exist set the given default value.
      Type Parameters:
      T - The type of the return value.
      Parameters:
      key - The key to search in the sessionObjects Map.
      def - The default value to use if the value does not exist.
      Returns:
      The value from sessionObjects or the default value.
    • getOrDefault

      public <T, U> T getOrDefault(String key, Function<U,T> def, U param)
      Get a value from the sessionObject. If the value does not exist set the given default value.
      Type Parameters:
      T - The type of the return value.
      U - The type of the parameter for the default function.
      Parameters:
      key - The key to search in the sessionObjects Map.
      def - The function to apply for the default value.
      param - The parameter for the default function.
      Returns:
      The value from sessionObjects or the default value.
    • get

      public <T> T get(Class<T> objectClass)
    • put

      public void put(Object object)
    • put

      public Object put(String arg0, Object arg1)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable