Class Session.Builder

  • Enclosing class:
    Session

    public static class Session.Builder
    extends Object
    Builder for Session.
    • 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.