massim.eismassim
Class Statistic

java.lang.Object
  extended by massim.eismassim.Statistic

public class Statistic
extends java.lang.Object

Class to be used for some statistic purpose, e.g. the time between requests and actions or the total number of actions of a distinct type

Author:
tobi

Field Summary
static java.lang.String TEST_FLAG
           
 
Constructor Summary
Statistic()
           
 
Method Summary
 void applySettingsOf(Statistic statistic)
          Apply toShell, toFile and submit-settings of given statistic to this statistic
 void disableSend()
           
 void enableTestMode()
          this method will guarantee, that results submitted via php will contain a special flag that marks them as testing-results, so they can be sorted out
 boolean[] getSettings()
          1: toFile 2: toShell 3: submit
 void logByePercept(java.lang.String connName)
           
 void logRequestActionPercept(java.lang.String connName)
           
 void logSimEndPercept(java.lang.String connName)
           
 void logSimStartPercept(java.lang.String connName)
           
 void onSimulationEnd()
          Print the gathered data to a file and/or to the shell and/or submit them
 void setLogToFile()
           
 void setLogToShell()
           
 void submitAchievement(java.lang.String achievement, java.lang.String name)
           
 void submitAction(java.lang.String name, int actionID, java.lang.String type, long timestamp)
           
 void submitActionResult(java.lang.String name, java.lang.String lastActionType, java.lang.String lastActionResult)
           
 void submitRequest(java.lang.String name, int actionID)
           
 void submitZoneScore(java.lang.Integer score, java.lang.String name)
           
 void submitZonesScore(java.lang.Integer score, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_FLAG

public static final java.lang.String TEST_FLAG
See Also:
Constant Field Values
Constructor Detail

Statistic

public Statistic()
Method Detail

onSimulationEnd

public void onSimulationEnd()
Print the gathered data to a file and/or to the shell and/or submit them


setLogToFile

public void setLogToFile()

setLogToShell

public void setLogToShell()

disableSend

public void disableSend()

enableTestMode

public void enableTestMode()
this method will guarantee, that results submitted via php will contain a special flag that marks them as testing-results, so they can be sorted out


submitRequest

public void submitRequest(java.lang.String name,
                          int actionID)

submitAction

public void submitAction(java.lang.String name,
                         int actionID,
                         java.lang.String type,
                         long timestamp)

logSimStartPercept

public void logSimStartPercept(java.lang.String connName)

logSimEndPercept

public void logSimEndPercept(java.lang.String connName)

logRequestActionPercept

public void logRequestActionPercept(java.lang.String connName)

logByePercept

public void logByePercept(java.lang.String connName)

submitActionResult

public void submitActionResult(java.lang.String name,
                               java.lang.String lastActionType,
                               java.lang.String lastActionResult)
Parameters:
name - the connection's name
lastActionType - the type of the agent's last action
lastActionResult - the result of the action

submitZoneScore

public void submitZoneScore(java.lang.Integer score,
                            java.lang.String name)

submitZonesScore

public void submitZonesScore(java.lang.Integer score,
                             java.lang.String name)

submitAchievement

public void submitAchievement(java.lang.String achievement,
                              java.lang.String name)

getSettings

public boolean[] getSettings()
1: toFile 2: toShell 3: submit

Returns:

applySettingsOf

public void applySettingsOf(Statistic statistic)
Apply toShell, toFile and submit-settings of given statistic to this statistic

Parameters:
statistic -


Copyright © 2012. All Rights Reserved.