@API(status=STABLE)
public class ActivityRegistry
extends java.lang.Object
AbstractActivity
to the Real Time Events source, or Datafeed.
It also maintains the list of registered activities.
If an activity to be registered is already existing in the registry, then the old one will be replaced.
In case of an activity of type SlashCommand
, it will replace the old one if this latter has the same name and both require bot mention (or both don't).
If the activity has /help as name, then it will replace HelpCommand
if it is already registered.
Constructor and Description |
---|
ActivityRegistry(UserV2 botSession,
DatafeedLoop datafeedLoop) |
Modifier and Type | Method and Description |
---|---|
java.util.List<AbstractActivity<?,?>> |
getActivityList() |
void |
register(AbstractActivity<?,?> activity)
Registers an activity within the registry.
|
public ActivityRegistry(UserV2 botSession, DatafeedLoop datafeedLoop)
public void register(AbstractActivity<?,?> activity)
activity
- An activity.public java.util.List<AbstractActivity<?,?>> getActivityList()