public class AdminUIModule extends AbstractModule<AdminUIConfig> implements IEventListener
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
protected static String |
SERVLET_PARAM_MODULE_ID |
protected static String |
SERVLET_PARAM_UI_CLASS |
protected static String |
WIDGETSET |
config, eventHandler, lastError, logger, startRequested, state, stateLock, statusMsg
Constructor and Description |
---|
AdminUIModule() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Cleans up all ressources used by the module when deleted
All persistent resources created by the module should be cleaned
when this is called
|
protected IModuleConfigForm |
generateForm(Class<?> clazz) |
protected IModuleAdminPanel<IModule<?>> |
generatePanel(Class<?> clazz) |
static AdminUIModule |
getInstance() |
void |
handleEvent(Event<?> e) |
void |
requestStart()
Requests the module to start.
Implementations of this method may block until the module is started or return immediately while they wait for the proper start conditions. When this method returns without error the module state is guaranteed to be ModuleEvent.ModuleState.STARTING |
void |
setConfiguration(AdminUIConfig config)
Sets the module configuration
|
void |
start()
Starts the module synchronously with the current configuration.
Implementations of this method must block until the module is successfully started or send an exception. Module lifecycle events may not be generated when calling this method directly. init() should always be called before start(). |
void |
stop()
Stops the module.
All temporary resources created by the module should be cleaned when this is called (ex: memory, files, connections, etc.) Implementations of this method must block until the module is successfully stopped or send an exception. Module lifecycle events may not be generated when calling this method directly. stop() can be called right after init() even if start() hasn't been called. |
canInit, canStart, canStop, clearError, clearStatus, getConfiguration, getCurrentError, getCurrentState, getLocalID, getLogger, getName, getStatusMessage, init, init, isInitialized, isStarted, loadState, notifyConnectionStatus, registerListener, reportError, reportError, reportStatus, requestInit, requestStop, saveState, setState, toString, unregisterListener, updateConfig, waitForState
protected static final org.slf4j.Logger log
protected static final String SERVLET_PARAM_UI_CLASS
protected static final String SERVLET_PARAM_MODULE_ID
protected static final String WIDGETSET
public static AdminUIModule getInstance()
public void requestStart() throws SensorHubException
IModule
ModuleEvent.ModuleState.STARTING
requestStart
in interface IModule<AdminUIConfig>
requestStart
in class AbstractModule<AdminUIConfig>
SensorHubException
- if startup could not be initiatedpublic void setConfiguration(AdminUIConfig config)
IModule
setConfiguration
in interface IModule<AdminUIConfig>
setConfiguration
in class AbstractModule<AdminUIConfig>
public void start() throws SensorHubException
IModule
start
in interface IModule<AdminUIConfig>
SensorHubException
public void stop()
IModule
stop
in interface IModule<AdminUIConfig>
protected IModuleAdminPanel<IModule<?>> generatePanel(Class<?> clazz)
protected IModuleConfigForm generateForm(Class<?> clazz)
public void cleanup() throws SensorHubException
IModule
cleanup
in interface IModule<AdminUIConfig>
SensorHubException
public void handleEvent(Event<?> e)
handleEvent
in interface IEventListener
Copyright © 2016 Sensia Software LLC. All rights reserved.