org.ow2.clif.analyze.lib.graph
Class DataProxyImpl

java.lang.Object
  extended by org.ow2.clif.analyze.lib.graph.DataProxyImpl
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, DataSupplier

public class DataProxyImpl
extends java.lang.Object
implements DataSupplier, org.objectweb.fractal.api.control.BindingController

The Class DataProxyImpl.


Field Summary
 
Fields inherited from interface org.ow2.clif.analyze.api.graph.DataSupplier
DATA_SUPPLIER, STAT_MAXIMUMS, STAT_MEANS, STAT_MINIMUMS, STAT_STD_DEVIATION
 
Constructor Summary
DataProxyImpl()
          Instantiates a new data proxy impl.
 
Method Summary
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 long countValues(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String YFieldLabel)
          Count values for the giving field label.
 java.lang.Object[][] getAllFieldsValues(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String XFieldLabel, java.lang.String YFieldLabel, int start, int end, int count)
          Get all the values for a field from an event type, bladeId and test name
 BladeDescriptor[] getBladeDescriptor(java.lang.String testName, BladeFilter filter)
          Get the blade descriptor from a test and a blade filter
 BladeEvent[] getBladeEvents(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, EventFilter filter, long fromIndex, int count)
          Get a bladeEvent array from a testName, a bladeId, an event
 java.lang.Object[][] getBladeEventsValues(BladeEvent[] bladeEventList, java.lang.String XFieldLabel, java.lang.String YFieldLabel)
          Get 2 columns from a bladeEvent[] : use first getBladeEvents
 java.lang.String[] getBladesIds(java.lang.String testName)
          Get the baldes' ids.
 java.lang.String[] getEventFieldLabels(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel)
          Get the events fields labels.
 java.lang.String[] getEventsTypeLabels(java.lang.String testName, java.lang.String bladeId)
          Get the events labels.
 java.lang.Object[][] getFieldsValues(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String XFieldLabel, java.lang.String YFieldLabel, int start, int end, int count)
          Get the values for the X and Y fields.
 long getLifecycleCompleted(java.lang.String testName, java.lang.String bladeId)
          Get the completed life-cycle for a blade in a test
 long getLifecycleRunning(java.lang.String testName, java.lang.String bladeId)
          Get the running life-cycle for a blade in a test
 long getMaxTimeFor(java.lang.String testName, java.lang.String bladeId)
          Gets the max time for.
 java.lang.Object[][] getMaxValues(java.lang.Object[][] values, int timeWindow, int step)
          Gets the max values.
 java.lang.Object[][] getMeans(java.lang.Object[][] values, int timeWindow, int step)
          Gets the means.
 java.lang.Object[][] getMinValues(java.lang.Object[][] values, int timeWindow, int step)
          Gets the min values.
 java.lang.Object[][] getStandardDeviations(java.lang.Object[][] values, int timeWindow, int step)
          Gets the standard deviation.
 java.util.Map getStatistics(java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String XFieldLabel, java.lang.String YFieldLabel, int start, int end, int count)
          Get statistic on the Y field.
 BladeDescriptor[] getTestPlan(java.lang.String testName, BladeFilter filter)
          Get the blade descriptors
 java.lang.String[] getTestsNames()
          Get the tests' names.
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataProxyImpl

public DataProxyImpl()
Instantiates a new data proxy impl.

Method Detail

getLifecycleRunning

public long getLifecycleRunning(java.lang.String testName,
                                java.lang.String bladeId)
Description copied from interface: DataSupplier
Get the running life-cycle for a blade in a test

Specified by:
getLifecycleRunning in interface DataSupplier
Parameters:
testName - the test name
bladeId - the blade ID

getLifecycleCompleted

public long getLifecycleCompleted(java.lang.String testName,
                                  java.lang.String bladeId)
Description copied from interface: DataSupplier
Get the completed life-cycle for a blade in a test

Specified by:
getLifecycleCompleted in interface DataSupplier
Parameters:
testName - the test name
bladeId - the blade ID

getAllFieldsValues

public java.lang.Object[][] getAllFieldsValues(java.lang.String testName,
                                               java.lang.String bladeId,
                                               java.lang.String eventTypeLabel,
                                               java.lang.String XFieldLabel,
                                               java.lang.String YFieldLabel,
                                               int start,
                                               int end,
                                               int count)
Description copied from interface: DataSupplier
Get all the values for a field from an event type, bladeId and test name

Specified by:
getAllFieldsValues in interface DataSupplier
Parameters:
testName - the test name
bladeId - the blade ID
eventTypeLabel - the event type name/label
XFieldLabel - the X field
YFieldLabel - the Y field
start - the start time
end - the end time
count - the values count
Returns:
an object[][] that contains the values

countValues

public long countValues(java.lang.String testName,
                        java.lang.String bladeId,
                        java.lang.String eventTypeLabel,
                        java.lang.String YFieldLabel)
Description copied from interface: DataSupplier
Count values for the giving field label.

Specified by:
countValues in interface DataSupplier
Parameters:
testName - the test run name
bladeId - the blade id
eventTypeLabel - the event type label
YFieldLabel - the Y field label
Returns:
the number of values

getBladesIds

public java.lang.String[] getBladesIds(java.lang.String testName)
Description copied from interface: DataSupplier
Get the baldes' ids.

Specified by:
getBladesIds in interface DataSupplier
Parameters:
testName - the test run name
Returns:
an array that contains the blades ids of the given test

getEventFieldLabels

public java.lang.String[] getEventFieldLabels(java.lang.String testName,
                                              java.lang.String bladeId,
                                              java.lang.String eventTypeLabel)
Description copied from interface: DataSupplier
Get the events fields labels.

Specified by:
getEventFieldLabels in interface DataSupplier
Parameters:
testName - the test run name
bladeId - the blade identifier from the given test run
eventTypeLabel - the label of the event type
Returns:
an array that contains the labels of the given event type

getEventsTypeLabels

public java.lang.String[] getEventsTypeLabels(java.lang.String testName,
                                              java.lang.String bladeId)
Description copied from interface: DataSupplier
Get the events labels.

Specified by:
getEventsTypeLabels in interface DataSupplier
Parameters:
testName - the test run name
bladeId - the blade identifier
Returns:
an array that contains the events label of the given blade

getFieldsValues

public java.lang.Object[][] getFieldsValues(java.lang.String testName,
                                            java.lang.String bladeId,
                                            java.lang.String eventTypeLabel,
                                            java.lang.String XFieldLabel,
                                            java.lang.String YFieldLabel,
                                            int start,
                                            int end,
                                            int count)
Description copied from interface: DataSupplier
Get the values for the X and Y fields.

Specified by:
getFieldsValues in interface DataSupplier
Parameters:
testName - the test run name
bladeId - the blade identifier from the given test run
eventTypeLabel - the label of the event type
XFieldLabel - the label of the X field
YFieldLabel - the label of the Y field
start - the start
end - the end
count - the count
Returns:
a two dimension array that contains the values of the given fields

getMaxValues

public java.lang.Object[][] getMaxValues(java.lang.Object[][] values,
                                         int timeWindow,
                                         int step)
Description copied from interface: DataSupplier
Gets the max values.

Specified by:
getMaxValues in interface DataSupplier
Parameters:
values - the values
timeWindow - the time window
step - the step
Returns:
the max values

getMeans

public java.lang.Object[][] getMeans(java.lang.Object[][] values,
                                     int timeWindow,
                                     int step)
Description copied from interface: DataSupplier
Gets the means.

Specified by:
getMeans in interface DataSupplier
Parameters:
values - the values
timeWindow - the window
step - the step
Returns:
the means

getMinValues

public java.lang.Object[][] getMinValues(java.lang.Object[][] values,
                                         int timeWindow,
                                         int step)
Description copied from interface: DataSupplier
Gets the min values.

Specified by:
getMinValues in interface DataSupplier
Parameters:
values - the values
timeWindow - the time window
step - the step
Returns:
the min values

getStandardDeviations

public java.lang.Object[][] getStandardDeviations(java.lang.Object[][] values,
                                                  int timeWindow,
                                                  int step)
Description copied from interface: DataSupplier
Gets the standard deviation.

Specified by:
getStandardDeviations in interface DataSupplier
Parameters:
values - the values
timeWindow - the window
step - the step
Returns:
the standard deviation

getStatistics

public java.util.Map getStatistics(java.lang.String testName,
                                   java.lang.String bladeId,
                                   java.lang.String eventTypeLabel,
                                   java.lang.String XFieldLabel,
                                   java.lang.String YFieldLabel,
                                   int start,
                                   int end,
                                   int count)
Description copied from interface: DataSupplier
Get statistic on the Y field.

Specified by:
getStatistics in interface DataSupplier
Parameters:
testName - the test run name
bladeId - the blade identifier from the given test run
eventTypeLabel - the label of the event type
XFieldLabel - the label of the X field
YFieldLabel - the label of the Y field
start - the start
end - the end
count - the count
Returns:
a map that contains the various statistics on the Y field

getTestsNames

public java.lang.String[] getTestsNames()
Description copied from interface: DataSupplier
Get the tests' names.

Specified by:
getTestsNames in interface DataSupplier
Returns:
an array that contains the tests' names

getMaxTimeFor

public long getMaxTimeFor(java.lang.String testName,
                          java.lang.String bladeId)
Description copied from interface: DataSupplier
Gets the max time for.

Specified by:
getMaxTimeFor in interface DataSupplier
Parameters:
testName - the test name
bladeId - the blade id
Returns:
the max time for

getTestPlan

public BladeDescriptor[] getTestPlan(java.lang.String testName,
                                     BladeFilter filter)
Description copied from interface: DataSupplier
Get the blade descriptors

Specified by:
getTestPlan in interface DataSupplier
Parameters:
testName - the test name
filter - the blade filter, null means no filter
Returns:
an array that contains the blade descriptors

getBladeEvents

public BladeEvent[] getBladeEvents(java.lang.String testName,
                                   java.lang.String bladeId,
                                   java.lang.String eventTypeLabel,
                                   EventFilter filter,
                                   long fromIndex,
                                   int count)
                            throws ClifException
Description copied from interface: DataSupplier
Get a bladeEvent array from a testName, a bladeId, an event

Specified by:
getBladeEvents in interface DataSupplier
Throws:
ClifException

getBladeEventsValues

public java.lang.Object[][] getBladeEventsValues(BladeEvent[] bladeEventList,
                                                 java.lang.String XFieldLabel,
                                                 java.lang.String YFieldLabel)
Description copied from interface: DataSupplier
Get 2 columns from a bladeEvent[] : use first getBladeEvents

Specified by:
getBladeEventsValues in interface DataSupplier

getBladeDescriptor

public BladeDescriptor[] getBladeDescriptor(java.lang.String testName,
                                            BladeFilter filter)
Description copied from interface: DataSupplier
Get the blade descriptor from a test and a blade filter

Specified by:
getBladeDescriptor in interface DataSupplier

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException