blackboard.platform.monitor.db
Class ConnectionMonitorEvent

java.lang.Object
  extended by java.util.EventObject
      extended by blackboard.platform.monitor.MonitorEvent<ConnectionMonitor>
          extended by blackboard.platform.monitor.db.ConnectionMonitorEvent
All Implemented Interfaces:
DatabaseInfo, java.io.Serializable
Direct Known Subclasses:
SQLExecutionEvent

public class ConnectionMonitorEvent
extends MonitorEvent<ConnectionMonitor>
implements DatabaseInfo

The ConnectionMonitorEvent class is used to send out information about events occurring within the database code of the Blackboard system. See also the SQLExecutionEvent interface, for an example of a more specific type of database event.

Since:
Bb 9.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectionMonitorEvent(ConnectionMonitor monitor)
          Creates a new connection monitor event.
 
Method Summary
 int getConnectionUsage()
          Returns the number of connections currently active within the connection pool.
 java.lang.String getDatabaseHost()
          Returns the database hostname.
 java.lang.String getDatabaseInstance()
          Returns the database instance name, or the empty string if no instance name is used.
 java.lang.String getDatabaseName()
          Returns the name of the database.
 java.lang.String getDatabaseUser()
          Returns the database user for the given database.
 int getMaxPoolSize()
          Returns the maximum size of the connection pool.
 int getMinPoolSize()
          Returns the minimum size of the connection pool.
 
Methods inherited from class blackboard.platform.monitor.MonitorEvent
getMonitor, getSessionId, getThreadId, getTimestamp, getUserId, getUserName
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionMonitorEvent

public ConnectionMonitorEvent(ConnectionMonitor monitor)
Creates a new connection monitor event.

Parameters:
monitor - The monitor which is creating this event.
Method Detail

getConnectionUsage

public int getConnectionUsage()
Description copied from interface: DatabaseInfo
Returns the number of connections currently active within the connection pool. The number of free connections would be this number subtracted from the pool's maximum size.

Specified by:
getConnectionUsage in interface DatabaseInfo
Returns:
The number of currently active connections within the pool
See Also:
DatabaseInfo.getConnectionUsage()

getDatabaseHost

public java.lang.String getDatabaseHost()
Description copied from interface: DatabaseInfo
Returns the database hostname.

Specified by:
getDatabaseHost in interface DatabaseInfo
Returns:
The database hostname
See Also:
DatabaseInfo.getDatabaseHost()

getDatabaseInstance

public java.lang.String getDatabaseInstance()
Description copied from interface: DatabaseInfo
Returns the database instance name, or the empty string if no instance name is used.

Specified by:
getDatabaseInstance in interface DatabaseInfo
Returns:
The database instance name
See Also:
DatabaseInfo.getDatabaseInstance()

getDatabaseName

public java.lang.String getDatabaseName()
Description copied from interface: DatabaseInfo
Returns the name of the database.

Specified by:
getDatabaseName in interface DatabaseInfo
Returns:
The database name
See Also:
DatabaseInfo.getDatabaseName()

getDatabaseUser

public java.lang.String getDatabaseUser()
Description copied from interface: DatabaseInfo
Returns the database user for the given database.

Specified by:
getDatabaseUser in interface DatabaseInfo
Returns:
The database username
See Also:
DatabaseInfo.getDatabaseUser()

getMinPoolSize

public int getMinPoolSize()
Description copied from interface: DatabaseInfo
Returns the minimum size of the connection pool.

Specified by:
getMinPoolSize in interface DatabaseInfo
Returns:
The connection pool minimum size
See Also:
DatabaseInfo.getMinPoolSize()

getMaxPoolSize

public int getMaxPoolSize()
Description copied from interface: DatabaseInfo
Returns the maximum size of the connection pool.

Specified by:
getMaxPoolSize in interface DatabaseInfo
Returns:
The connection pool maximum size
See Also:
DatabaseInfo.getMaxPoolSize()


Copyright © 2012 Blackboard, Inc. All Rights Reserved.