graphmine-core / io.github.sof3.graphmine / Server
class Server : Scope, HasLogger
The Server should be the object that links up different components of the server.
To prevent cyclic dependency, instead of passing the Server object around, pass the objects that will actually be used, e.g. the logger, the config, etc.
| <init> | Server(dataDir: File, config: CoreConfig, initNano: Long = System.nanoTime(), scope: BaseScope = BaseScope(Server::class))The Server should be the object that links up different components of the server. |
| commandMap | val commandMap: CommandMapStores the list of server-wide commands |
| config | val config: CoreConfigthe server config |
| dataDir | val dataDir: Filethe server data directory |
| locale | val locale: Stringthe default locale of the server. |
| logger | val logger: Loggerthe logger used for the server scope. Plugins should use their own logger instead of this one. |
| shutdownHandlers | val shutdownHandlers: MutableList<() -> Unit>List of Runnables that are called when the server shuts down |
| shutdown | fun shutdown(): Unit |
| debug | open fun debug(i18n: I18n): UnitLogs a DEBUG-level message |
| error | open fun error(i18n: I18n): UnitLogs a ERROR-level message |
| fatal | open fun fatal(i18n: I18n): UnitLogs a FATAL-level message |
| info | open fun info(i18n: I18n): UnitLogs a INFO-level message |
| warn | open fun warn(i18n: I18n): UnitLogs a WARN-level message |