#3 session API draft
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user