The framework is avoiding singletons so it can be properly bootstrapped programmatically, thus neatly integrating in any of your business applications based on Java.
The bootstrapping process can be seen in the
run method of the main class.
It boils down to the following method calls:
JeakBot jeakBot = new JeakBot(); jeakBot.setBaseDir(baseDir); jeakBot.setConfDir(confDir); jeakBot.setConfig(botConfig); jeakBot.setPluginManager(pluginManager); // Shutdown callback. jeakBot.onShutdown(this::onBotShutdown); // The class implements ``Runnable`` // It can be run in the current thread or submitted into an executor. // The run method exits, when the connection has been established. jeakBot.run();
Updated over 3 years ago