Class: Application

Application

new Application(inCallback)

Application which advertises via MDNS and serves via HTTP
Parameters:
Name Type Description
inCallback function function to call on completion
Source:

Methods

getProperty(inName)

Return the value of a specific property
Parameters:
Name Type Description
inName string name of property to return
Source:

loadConfig(inCallback)

Load configuration - by default from sensible-config.json Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

loadProperties(inCallback)

Load properties - by default from sensible-properties.json Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

onAfterStart(inCallback)

Do app-specific tasks immediately after running start()
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

onBeforeStart(inCallback)

Do app-specific tasks immediately prior to running start()
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

registerHost(inCallback)

Register the hostname with MDNS - name comes from config Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

registerService(inCallback)

Register the service with MDNS - service info comes from config Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

saveConfig(inCallback)

Save configuration - by default to sensible-config.json Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

saveProperties(inCallback)

Save properties - by default to sensible-properties.json Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

setProperty(inName, inValue)

Set the value of a specific property
Parameters:
Name Type Description
inName string name of property whose value to set
inValue object value
Source:

start(inCallback)

Start everything - MDNS advertisement and HTTP server
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

startMDNS(inCallback)

Start MDNS Overridden by Application subclasses if they don't use our mDNS implementation.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

startWebServer(inCallback)

Start HTTP server Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

stop(inCallback)

Stop everything - MDNS advertisement and HTTP server Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

stopHTTPServer(inCallback)

Stop HTTP server Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

unregisterHost(inCallback)

Unregister the hostname with MDNS - name comes from config Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source:

unregisterService(inCallback)

Unregister the service with MDNS - service info comes from config Usually overridden by platform-specific Application class.
Parameters:
Name Type Description
inCallback function function to be called on completion
Source: