org.objectweb.cjdbc.common.monitor.client
Class AbstractClientDataCollector

java.lang.Object
  extended byorg.objectweb.cjdbc.common.monitor.AbstractDataCollector
      extended byorg.objectweb.cjdbc.common.monitor.client.AbstractClientDataCollector
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClientActiveTimeCollector

public abstract class AbstractClientDataCollector
extends AbstractDataCollector

Collects information about C-JDBC clients. TODO: Implements proper client data collection. This is not used at the moment.

Author:
Nicolas Modrzyk
See Also:
Serialized Form

Field Summary
private  java.lang.String clientId
           
private  int clientIndex
           
private  java.lang.String virtualDatabaseName
           
 
Fields inherited from class org.objectweb.cjdbc.common.monitor.AbstractDataCollector
controller
 
Constructor Summary
AbstractClientDataCollector(java.lang.String virtualDatabaseName, java.lang.String clientId)
           
 
Method Summary
private  java.lang.Object checkClientIndex()
           
 long collectValue()
          This is used on the controller side to collect information
 java.lang.String getTargetName()
          Return the name of the target of this collector
abstract  long getValue(java.lang.Object client)
          We have the client object so let's get the value we want from ot
private  java.lang.Object setClientIndex()
           
 
Methods inherited from class org.objectweb.cjdbc.common.monitor.AbstractDataCollector
getDescription, setController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

virtualDatabaseName

private java.lang.String virtualDatabaseName

clientId

private java.lang.String clientId

clientIndex

private int clientIndex
Constructor Detail

AbstractClientDataCollector

public AbstractClientDataCollector(java.lang.String virtualDatabaseName,
                                   java.lang.String clientId)
                            throws DataCollectorException
Parameters:
virtualDatabaseName - of the virtualdatabase
clientId - for the client
Throws:
DataCollectorException - if cannot access client
Method Detail

setClientIndex

private java.lang.Object setClientIndex()
                                 throws DataCollectorException
Throws:
DataCollectorException

checkClientIndex

private java.lang.Object checkClientIndex()
                                   throws DataCollectorException
Throws:
DataCollectorException

collectValue

public long collectValue()
                  throws DataCollectorException
Description copied from class: AbstractDataCollector
This is used on the controller side to collect information

Specified by:
collectValue in class AbstractDataCollector
Returns:
the value collected by this collectorsardes@inrialpes.fr
Throws:
DataCollectorException - if fails to collect the information
See Also:
AbstractDataCollector.collectValue()

getValue

public abstract long getValue(java.lang.Object client)
We have the client object so let's get the value we want from ot

Parameters:
client - as an object to allow it through RMI, but IS a VirtualDatabaseWorkerThread
Returns:
the collected value

getTargetName

public java.lang.String getTargetName()
Description copied from class: AbstractDataCollector
Return the name of the target of this collector

Specified by:
getTargetName in class AbstractDataCollector
Returns:
target name
See Also:
AbstractDataCollector.getTargetName()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.