raccoon.tibco.tibrv.hoststatus.db
Class DbMonitor

java.lang.Object
  extended by java.lang.Thread
      extended by raccoon.tibco.tibrv.hoststatus.db.DbMonitor
All Implemented Interfaces:
java.lang.Runnable

public class DbMonitor
extends java.lang.Thread

The host status utility that is based on database backend.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.lang.String HOST_STATUS_SUBJECT
          The host status message subject
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DbMonitor(java.lang.String pDbConnectionString, java.lang.String pDbUserName, java.lang.String pDbPassword, ILogger pLogger)
          Creates the required instance for KPI reporting.
 
Method Summary
 void createTransport(TransportConfig pKPIConfig, DbWriter pWriter)
          Appends the default listener using the configuration information supplied.
 IConfig getConfig()
           
 boolean isActive()
           
 void load()
          Opens the communication with Rendezvous and loads the listeners.
 void run()
           
 void setConfig(IConfig pConfig)
           
 void setDbPollInterval(int pDbPollInterval)
           
 void unload()
          Deactivates this instance.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOST_STATUS_SUBJECT

public static final java.lang.String HOST_STATUS_SUBJECT
The host status message subject

See Also:
Constant Field Values
Constructor Detail

DbMonitor

public DbMonitor(java.lang.String pDbConnectionString,
                 java.lang.String pDbUserName,
                 java.lang.String pDbPassword,
                 ILogger pLogger)
          throws java.sql.SQLException
Creates the required instance for KPI reporting.

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
Method Detail

getConfig

public IConfig getConfig()

setConfig

public void setConfig(IConfig pConfig)

setDbPollInterval

public void setDbPollInterval(int pDbPollInterval)

isActive

public boolean isActive()

load

public void load()
          throws java.sql.SQLException,
                 com.tibco.tibrv.TibrvException
Opens the communication with Rendezvous and loads the listeners.

Throws:
java.sql.SQLException
com.tibco.tibrv.TibrvException

unload

public void unload()
            throws java.sql.SQLException
Deactivates this instance.

Throws:
java.sql.SQLException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

createTransport

public void createTransport(TransportConfig pKPIConfig,
                            DbWriter pWriter)
                     throws com.tibco.tibrv.TibrvException
Appends the default listener using the configuration information supplied.

Throws:
com.tibco.tibrv.TibrvException - if the transport couldn't be created.


Copyright null null. All Rights Reserved.