#3 session API draft

This commit is contained in:
2021-09-23 14:56:07 +03:00
parent 05af2f05a4
commit c62de38f17
13 changed files with 258 additions and 138 deletions
@@ -14,4 +14,5 @@ public interface BotRequest {
Long getChatId();
BotSession getSession();
}
@@ -0,0 +1,9 @@
package ru.penkrat.stbf.api;
public interface BotSession {
Object getAttribute(String name);
void setAttribute(String name, Object value);
}
@@ -0,0 +1,8 @@
package ru.penkrat.stbf.api;
@FunctionalInterface
public interface SessionProvider {
BotSession get(Long chatId);
}