public class BasicSecurityRealm extends AbstractModule<BasicSecurityRealmConfig> implements IUserRegistry, IRoleRegistry, IAuthorizer
config, eventHandler, lastError, logger, securityHandler, startRequested, state, stateLock, statusMsg
Constructor and Description |
---|
BasicSecurityRealm() |
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
|
IUserRole |
getRoleInfo(String roleID) |
IUserInfo |
getUserInfo(String userID) |
void |
init()
Initializes the module synchronously with the current configuration.
Implementations of this method must block until the module is successfully initialized or send an exception. Module lifecycle events may not be generated when calling this method directly. |
boolean |
isAuthorized(IUserInfo user,
IPermissionPath request) |
void |
setConfiguration(BasicSecurityRealmConfig 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, isInitialized, isStarted, loadState, notifyConnectionStatus, registerListener, reportError, reportError, reportStatus, requestInit, requestStart, requestStop, saveState, setState, toString, unregisterListener, updateConfig, waitForState
public void setConfiguration(BasicSecurityRealmConfig config)
IModule
setConfiguration
in interface IModule<BasicSecurityRealmConfig>
setConfiguration
in class AbstractModule<BasicSecurityRealmConfig>
public void init() throws SensorHubException
IModule
init
in interface IModule<BasicSecurityRealmConfig>
init
in class AbstractModule<BasicSecurityRealmConfig>
SensorHubException
public void start() throws SensorHubException
IModule
start
in interface IModule<BasicSecurityRealmConfig>
SensorHubException
public void stop() throws SensorHubException
IModule
stop
in interface IModule<BasicSecurityRealmConfig>
SensorHubException
public void cleanup() throws SensorHubException
IModule
cleanup
in interface IModule<BasicSecurityRealmConfig>
SensorHubException
public IUserInfo getUserInfo(String userID)
getUserInfo
in interface IUserRegistry
public IUserRole getRoleInfo(String roleID)
getRoleInfo
in interface IRoleRegistry
public boolean isAuthorized(IUserInfo user, IPermissionPath request)
isAuthorized
in interface IAuthorizer
Copyright © 2016 Sensia Software LLC. All rights reserved.