MonitoringDBManager (consumer-service 1.8.0-SNAPSHOT API)
Date: 2013-02-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.messaging.common.consumer.db
Class MonitoringDBManager

    java.lang.Object
      org.gcube.messaging.common.consumer.db.DBManager
          org.gcube.messaging.common.consumer.db.MonitoringDBManager

All Implemented Interfaces:
  Runnable

    public class MonitoringDBManager

extends DBManager
implements Runnable

Author:
  Andrea Manzi(CERN)

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

### MonitoringDBManager

    public MonitoringDBManager()

  Constructor

Method Detail

### connectToMySql

    protected void connectToMySql()
                           throws Exception

  Specified by:
    `connectToMySql` in class `DBManager`
  Throws:
    `Exception`

### open

    public void open()
              throws ClassNotFoundException,
                     SQLException,
                     Exception

  Load the HSQL Database Engine JDBC driver and open the connection to the db.

  Specified by:
    `open` in class `DBManager`
  Throws:
    `ClassNotFoundException` - if the HSQL Database Engine JDBC driver is not loaded
    `SQLException` - if the connection to the db fails
    `Exception` - if the tables creation fails

### insertUser

    public void insertUser(MailRecipientHelper.MonitorUser user)

  Insert a user on the DB

  Parameters:
    `user` - the user to add

### getDomains

    public ResultSet getDomains()

  Returns:
    the domains

### insertDomain

    public void insertDomain(String domain,
                             String siteName)

  Insert a domain on the DB

  Parameters:
    `domain` - the domain to add

### associateUserAndDomain

    public void associateUserAndDomain(String userMail,
                                       String domain,
                                       String scope)

  Associate a user to a domain

  Parameters:
    `userMail` - the userMail to add
    `domain` - the domain to add

### cleanMonitoringConf

    public void cleanMonitoringConf(String scope)

  clean the given table

  Parameters:
    `tableName` -

### InsertGHNMessage

    public void InsertGHNMessage(org.gcube.messaging.common.messages.GHNMessage<?> message)

  Insert a GHNMessage on the DB

  Parameters:
    `message` - the Message

### InsertRIMessage

    public void InsertRIMessage(org.gcube.messaging.common.messages.RIMessage<?> message)

  Insert a RIMessage

  Parameters:
    `message` - message

### insertNotification

    public void insertNotification(Notification not)

  insert a Notification on the DB

  Parameters:
    `notification` - the notification

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013. All Rights Reserved.