|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.messaging.common.consumer.db.DBManager
org.gcube.messaging.common.consumer.db.MonitoringDBManager
public class MonitoringDBManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.messaging.common.consumer.db.DBManager |
|---|
DBManager.BaseConsumer |
| Field Summary |
|---|
| Fields inherited from class org.gcube.messaging.common.consumer.db.DBManager |
|---|
backupFolder, backupIntervalMS, connection, dbFileBaseFolder, dbFileName, dbName, password, poolManager, queriesFile, username |
| Constructor Summary | |
|---|---|
MonitoringDBManager()
Constructor |
|
| Method Summary | |
|---|---|
void |
associateUserAndDomain(String userMail,
String domain,
String scope)
Associate a user to a domain |
void |
cleanMonitoringConf(String scope)
clean the given table |
protected void |
connectToMySql()
|
ResultSet |
getDomains()
|
void |
insertDomain(String domain,
String siteName)
Insert a domain on the DB |
void |
InsertGHNMessage(org.gcube.messaging.common.messages.GHNMessage<?> message)
Insert a GHNMessage on the DB |
void |
insertNotification(Notification not)
insert a Notification on the DB |
void |
InsertRIMessage(org.gcube.messaging.common.messages.RIMessage<?> message)
Insert a RIMessage |
void |
insertUser(MailRecipientHelper.MonitorUser user)
Insert a user on the DB |
void |
open()
Load the HSQL Database Engine JDBC driver and open the connection to the db. |
void |
run()
|
| Methods inherited from class org.gcube.messaging.common.consumer.db.DBManager |
|---|
backup, close, connectToEmbeddedDB, createDB, query, queryAndConsume, queryJSON, quote, reconnectToDB, toJSon, update, zipFolder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MonitoringDBManager()
| Method Detail |
|---|
protected void connectToMySql()
throws Exception
connectToMySql in class DBManagerException
public void open()
throws ClassNotFoundException,
SQLException,
Exception
open in class DBManagerClassNotFoundException - if the HSQL Database Engine JDBC driver is not loaded
SQLException - if the connection to the db fails
Exception - if the tables creation failspublic void insertUser(MailRecipientHelper.MonitorUser user)
user - the user to addpublic ResultSet getDomains()
public void insertDomain(String domain,
String siteName)
domain - the domain to add
public void associateUserAndDomain(String userMail,
String domain,
String scope)
userMail - the userMail to adddomain - the domain to addpublic void cleanMonitoringConf(String scope)
tableName - public void InsertGHNMessage(org.gcube.messaging.common.messages.GHNMessage<?> message)
message - the Messagepublic void InsertRIMessage(org.gcube.messaging.common.messages.RIMessage<?> message)
message - messagepublic void insertNotification(Notification not)
notification - the notificationpublic void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||