- java.lang.Object
-
- li.pitschmann.knx.core.plugin.api.ApiPlugin
-
- All Implemented Interfaces:
ExtensionPlugin,Plugin
public class ApiPlugin extends Object implements ExtensionPlugin
Plugin for RESTful API (web server)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlogstatic IntegerConfigValuePORTDefault port for Pippo Micro Web Server (re-using the default port value)
-
Constructor Summary
Constructors Constructor Description ApiPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPort()Returns the port for web server that serves the endpointsbooleanisReady()Returns if the web server is readyvoidonInitialization(KnxClient client)voidonShutdown()voidonStart()protected voidstartPippo(ro.pippo.core.Pippo pippo)Starts the Pippo server.
-
-
-
Field Detail
-
PORT
public static final IntegerConfigValue PORT
Default port for Pippo Micro Web Server (re-using the default port value)
-
log
protected final org.slf4j.Logger log
-
-
Method Detail
-
onInitialization
public void onInitialization(KnxClient client)
- Specified by:
onInitializationin interfacePlugin
-
onStart
public void onStart()
- Specified by:
onStartin interfaceExtensionPlugin
-
onShutdown
public void onShutdown()
- Specified by:
onShutdownin interfaceExtensionPlugin
-
startPippo
protected void startPippo(ro.pippo.core.Pippo pippo)
Starts the Pippo server. This method can be overridden.- Parameters:
pippo- the instance for Pippo web server
-
getPort
public final int getPort()
Returns the port for web server that serves the endpoints- Returns:
- actual port
-
isReady
public final boolean isReady()
Returns if the web server is ready- Returns:
trueif server is ready, otherwisefalse
-
-