Package no.polaric.core
Interface ServerConfig
- All Known Implementing Classes:
ConfigBase
public interface ServerConfig
Interface for server configuration and management.
To be implemented by specific application-implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classNotifcation content class.static interfaceInterface to publish-subscribe service (based on websocket)static interfacestatic interfaceInterface to user databasestatic interfaceInterface to web server. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd shutdown handler function.config()Get configuration properties.booleangetBoolProperty(String pname, boolean dval) Get boolean configuration property.intgetIntProperty(String pname, int dval) Get integer configuration property.double[]getPosProperty(String pname) Get position (lat, long) configuration property.getProperty(String pname, String dval) Get string configuration property.Get webserver interfacelog()Use logfilePlugin properties.voidsetProperty(String pname, String dval) Set string configuration property.
-
Method Details
-
properties
Plugin properties.- Returns:
- A map of properties (name,value) to be used by plugins.
-
config
Properties config()Get configuration properties.- Returns:
- Properties object.
-
setProperty
Set string configuration property.- Parameters:
pname- property name.dval- default value.
-
getProperty
Get string configuration property.- Parameters:
pname- property name.dval- default value.- Returns:
- The value of the property (or dval if not registered)
-
getBoolProperty
Get boolean configuration property.- Parameters:
pname- property name.dval- default value.- Returns:
- The value of the property (or dval if not registered)
-
getIntProperty
Get integer configuration property.- Parameters:
pname- property name.dval- default value.- Returns:
- The value of the property (or dval if not registered)
-
getPosProperty
Get position (lat, long) configuration property.- Parameters:
pname- property name.- Returns:
- [lat, long] coordinate
-
log
Logfile log()Use logfile -
getWebserver
ServerConfig.Web getWebserver()Get webserver interface -
addShutdownHandler
Add shutdown handler function.
-