GraphMine

graphmine-core / io.github.sof3.graphmine / Server

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.

Constructors

<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.

Properties

commandMap val commandMap: CommandMap
Stores the list of server-wide commands
config val config: CoreConfig
the server config
dataDir val dataDir: File
the server data directory
locale val locale: String
the default locale of the server.
logger val logger: Logger
the 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

Functions

shutdown fun shutdown(): Unit

Inherited Functions

debug open fun debug(i18n: I18n): Unit
Logs a DEBUG-level message
error open fun error(i18n: I18n): Unit
Logs a ERROR-level message
fatal open fun fatal(i18n: I18n): Unit
Logs a FATAL-level message
info open fun info(i18n: I18n): Unit
Logs a INFO-level message
warn open fun warn(i18n: I18n): Unit
Logs a WARN-level message