#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

View File

@@ -14,4 +14,5 @@ public interface BotRequest {
Long getChatId();
BotSession getSession();
}

View File

@@ -0,0 +1,9 @@
package ru.penkrat.stbf.api;
public interface BotSession {
Object getAttribute(String name);
void setAttribute(String name, Object value);
}

View File

@@ -0,0 +1,8 @@
package ru.penkrat.stbf.api;
@FunctionalInterface
public interface SessionProvider {
BotSession get(Long chatId);
}