Class Session.Builder

  • Enclosing class:
    Session

    public static class Session.Builder
    extends java.lang.Object
    Builder for Session.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Session build()
      Create a new instance of session.
      <T> Session.Builder put​(@NotNull Session.Key<T> key, T value)
      Adds a session variable into store.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • put

        public final <T> Session.Builder put​(@NotNull
                                             @NotNull Session.Key<T> key,
                                             @Nullable
                                             T value)
        Adds a session variable into store.
        Type Parameters:
        T - the type of the value of the session variable
        Parameters:
        key - an unique name of the session variable
        value - the value of the session variable
        Returns:
        an instance of Builder
      • build

        public final Session build()
        Create a new instance of session.
        Returns:
        A new instance of session.