raccoon.tibco.tibrv.hoststatus.db
Class DbPoller

java.lang.Object
  extended by raccoon.tibco.tibrv.hoststatus.db.DbPoller

public class DbPoller
extends java.lang.Object

Database configuration polling class.

Since:
Raccoon v1.0
Version:
$Id:$
Author:
Cedric ROUVRAIS

Constructor Summary
DbPoller(java.lang.String pDbConnectionString, java.lang.String pDbUserName, java.lang.String pDbPassword)
          Connects to the database.
 
Method Summary
 java.util.Iterator iterConfig()
           
 void load()
          Creates the polling thread and continuously polls the database.
 boolean pollConfig()
          Queries the database for any configuration change.
 void unload()
          Stops polling the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbPoller

public DbPoller(java.lang.String pDbConnectionString,
                java.lang.String pDbUserName,
                java.lang.String pDbPassword)
         throws java.sql.SQLException
Connects to the database.

Parameters:
pDbConnectionString - the name of the machine hosting the database.
pDbUserName - the user name for the password.
pDbPassword - the password associated to the user.
Throws:
java.sql.SQLException - if the prepared statement couldn't be created.
Method Detail

load

public void load()
          throws java.sql.SQLException
Creates the polling thread and continuously polls the database.

Throws:
java.sql.SQLException

pollConfig

public boolean pollConfig()
                   throws java.sql.SQLException
Queries the database for any configuration change.

Throws:
java.sql.SQLException - if the configuration couldn't be retrieved.

iterConfig

public java.util.Iterator iterConfig()

unload

public void unload()
            throws java.sql.SQLException
Stops polling the database.

Throws:
java.sql.SQLException


Copyright null null. All Rights Reserved.