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 class
Notifcation content class.static interface
Interface to publish-subscribe service (based on websocket)static interface
static interface
Interface to user databasestatic interface
Interface to web server. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add shutdown handler function.config()
Get configuration properties.boolean
getBoolProperty
(String pname, boolean dval) Get boolean configuration property.int
getIntProperty
(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.void
setProperty
(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.
-