
public class PersistenceMySQL extends Object implements Persistence
| Constructor and Description |
|---|
PersistenceMySQL() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkUser(String id)
Check if a user is already persisted with an associated password pair.
|
boolean |
checkUserPWD(String id,
String pwd)
Method that checks the proper authentication of a persisted user-password
pair.
|
void |
init(RemoteAPI remoteAPI,
ModuleContext context)
Sets up the underlying database, creating any tables if not present
before, and performing any mainenance operations.
|
void |
removeOlderThan(Long millis)
Maintenance method that removes all stored data from all tables that was
introduced more than @param millis ago.
|
void |
removeRegister(String id)
Eliminate all persisted info (node registration, subscribers and callees)
of a remote node
|
void |
restore()
Restore in the R-API implementation (and consequently in the MW) all the
persisted information (registration, subscribers and callees) for all
nodes.
|
void |
storeCallee(String id,
String profile)
Persist a request to have a service callee for a node
|
void |
storeRegister(String id,
String remote,
String v)
Persist a request to have a registration of a remote node
|
void |
storeSubscriber(String id,
String pattern)
Persist a request to have a context subscriber for a node
|
void |
storeUserPWD(String id,
String pwd)
Store a new user-password pair for later authentication.
|
public void init(RemoteAPI remoteAPI, ModuleContext context)
Persistenceinit in interface PersistenceremoteAPI - The Remote API instance being used in the managercontext - Module Context of universAALpublic void storeRegister(String id, String remote, String v)
PersistencestoreRegister in interface Persistenceid - The id used to uniquely identify the remote noderemote - The remote access information for a remote nodev - The version of client invoking the API. Descriptive only. Can
be null.public void storeSubscriber(String id, String pattern)
PersistencestoreSubscriber in interface Persistenceid - The id used to uniquely identify the remote nodepattern - The serialized ContextEventPattern sent by the remote node in
the requestpublic void storeCallee(String id, String profile)
PersistencestoreCallee in interface Persistenceid - The id used to uniquely identify the remote nodeprofile - The serialized ServiceProfile sent by the remote node in the
requestpublic void removeRegister(String id)
PersistenceremoveRegister in interface Persistenceid - The id used to uniquely identify the remote nodepublic void restore()
Persistencerestore in interface Persistencepublic void removeOlderThan(Long millis)
millis - Minimum age, in milliseconds, at which the data will be
removed (data older than this will be removed)public void storeUserPWD(String id, String pwd)
PersistencestoreUserPWD in interface Persistenceid - Userpwd - Passwordpublic boolean checkUserPWD(String id, String pwd)
PersistencecheckUserPWD in interface Persistenceid - Userpwd - Passwordpublic boolean checkUser(String id)
PersistencecheckUser in interface Persistenceid - to checkCopyright © 2018 universAAL Consortium. All rights reserved.