Packagenet.user1.reactor.ui
Classpublic class StatsPane
InheritanceStatsPane Inheritance mx.containers.VBox

Since : ReactorGUI 1.0.0

Provides an on-screen display of application and connection statistics for a Reactor application, including message count, bandwidth usage, memory, and framerate.

See also

DebugPanel


Public Methods
 MethodDefined By
  
StatsPane
  
addStat(name:String, func:Function):void
Adds a new statistic to the StatsPane.
StatsPane
  
dispose():void
Disposes of the resources used by this object, preparing it for garbage collection.
StatsPane
  
setReactor(reactor:Reactor):void
Assigns the Reactor object for which this StatsPane will display statistics.
StatsPane
  
start():void
Activates the statistics pane.
StatsPane
  
stop():void
Deactivates the statistics pane.
StatsPane
Constructor Description
StatsPane()Constructor
public function StatsPane()



Method Descriptions
addStat()method
public function addStat(name:String, func:Function):void

Since : ReactorGUI 1.0.0

Adds a new statistic to the StatsPane. Each statistic must have a string name and a corresponding function that returns the value for that statistic. The StatsPane periodically calculates and displays the value of each statistic by calling the statistic's function. For example, the following code adds a "Connection Attempts" statistic that displays the number of times a Reactor application has attempted to connect to Union. The statistic's value is returned by the ConnectionManager class's built-in method, getConnectAttemptCount().

     addStat("Connection Attempts", reactor.getConnectionManager().getConnectAttemptCount); 
     

Parameters

name:String — The name of the statistic to add to the StatsPane.
 
func:Function — The function that calculates and returns the statistic's value.

dispose()method 
public function dispose():void

Since : ReactorGUI 1.0.0

Disposes of the resources used by this object, preparing it for garbage collection.

setReactor()method 
public function setReactor(reactor:Reactor):void

Since : ReactorGUI 1.0.0

Assigns the Reactor object for which this StatsPane will display statistics.

Parameters

reactor:Reactor

start()method 
public function start():void

Since : ReactorGUI 1.0.0

Activates the statistics pane.

stop()method 
public function stop():void

Since : ReactorGUI 1.0.0

Deactivates the statistics pane.