All Packages Class Hierarchy This Package Previous Next Index
Class calypso.core.atmswitch.SwitchStatistics
java.lang.Object
|
+----calypso.core.atmswitch.SwitchStatistics
- public class SwitchStatistics
- extends Object
Keeps record of statistical data for each port in the FSR-switch.
- Author:
- Kim Lahti / TCM laboratory / HUT
-
DEFAULT_SPEED_DISPLAY_ENABLED
- Constant to define if the default mode is, to take the amount of
cells transfered every second
NOTE ! If true default view_port and view_info must be set.
-
DEFAULT_UPDATE_INTERFACE_AND_TYPE
- Constant to define if the default mode is, to update the interfaces
and port types every minute or not.
-
listeners
- Vector object keeping knowledge about current listeners.
-
ONE_DAY_IN_HOURS
- Constant that is used to define the length of a day in hours.
-
ONE_DAY_IN_MILLIS
- Constant that is used to define the length of a day in milliseconds.
-
ONE_HOUR_IN_MILLIS
- Constant that is used to define the length of an hour in milliseconds.
-
ONE_MINUTE_IN_MILLIS
- Constant that is used to define the length of a minute in milliseconds.
-
ONE_MINUTE_IN_SECONDS
- Constant that is used to define the length of a minute in seconds.
-
ONE_SECOND_IN_MILLIS
- Constant that is used to define the length of the interval
investigated, in this case the length of a second in milliseconds.
-
PORT_INFO
- Constant that is used to define the number of info parameters
obtained with method getInfo.
-
SwitchStatistics(int)
-
-
addStatisticsListener(StatisticsListener)
- Method to add listener.
-
getStartTime()
- Gets the time when the switch was started.
-
getTotal()
- Gets the total amount since the switch was started.
-
notifyInterfaceChanged(int[])
- Method that notifies the event to all listeners.
-
notifyMinute(int[][])
- Method that notifies the event to all listeners.
-
notifyPortTypeChanged(int[])
- Method that notifies the event to all listeners.
-
notifySecond(int)
- Method that notifies the event to all listeners.
-
removeStatisticsListener(StatisticsListener)
- Method to remove listener.
-
setSpeedDisplay(boolean, int, int)
- Enables the cells per second check.
listeners
protected Vector listeners
- Vector object keeping knowledge about current listeners.
DEFAULT_SPEED_DISPLAY_ENABLED
protected static final boolean DEFAULT_SPEED_DISPLAY_ENABLED
- Constant to define if the default mode is, to take the amount of
cells transfered every second
NOTE ! If true default view_port and view_info must be set.
DEFAULT_UPDATE_INTERFACE_AND_TYPE
protected static final boolean DEFAULT_UPDATE_INTERFACE_AND_TYPE
- Constant to define if the default mode is, to update the interfaces
and port types every minute or not.
ONE_SECOND_IN_MILLIS
protected static final int ONE_SECOND_IN_MILLIS
- Constant that is used to define the length of the interval
investigated, in this case the length of a second in milliseconds.
ONE_MINUTE_IN_MILLIS
protected static final int ONE_MINUTE_IN_MILLIS
- Constant that is used to define the length of a minute in milliseconds.
ONE_HOUR_IN_MILLIS
protected static final int ONE_HOUR_IN_MILLIS
- Constant that is used to define the length of an hour in milliseconds.
ONE_DAY_IN_MILLIS
protected static final int ONE_DAY_IN_MILLIS
- Constant that is used to define the length of a day in milliseconds.
ONE_MINUTE_IN_SECONDS
protected static final int ONE_MINUTE_IN_SECONDS
- Constant that is used to define the length of a minute in seconds.
ONE_DAY_IN_HOURS
protected static final int ONE_DAY_IN_HOURS
- Constant that is used to define the length of a day in hours.
PORT_INFO
protected static final int PORT_INFO
- Constant that is used to define the number of info parameters
obtained with method getInfo.
SwitchStatistics
protected SwitchStatistics(int maxPortNumber_)
getStartTime
protected Calendar getStartTime()
- Gets the time when the switch was started.
setSpeedDisplay
protected void setSpeedDisplay(boolean isEnabled_,
int port_,
int info_)
- Enables the cells per second check.
getTotal
protected synchronized long[][] getTotal()
- Gets the total amount since the switch was started.
This method is used if listener wants to get total amount.
Listener calls this mehtod and updates total amount with
the oneSecond notification.
- Returns:
- Returns the result of the query.
removeStatisticsListener
public synchronized void removeStatisticsListener(StatisticsListener sl_)
- Method to remove listener.
- Parameters:
- sl_ - The listener removed.
addStatisticsListener
public synchronized void addStatisticsListener(StatisticsListener sl_)
- Method to add listener.
- Parameters:
- sl_ - The listener added.
notifySecond
protected void notifySecond(int value_)
- Method that notifies the event to all listeners.
- Parameters:
- value_ - The value of events occured to the switch.
notifyMinute
protected void notifyMinute(int value_[][])
- Method that notifies the event to all listeners.
- Parameters:
- value_ - The value of events occured to the switch.
notifyInterfaceChanged
protected void notifyInterfaceChanged(int interfaces_[])
- Method that notifies the event to all listeners.
- Parameters:
- interfaces_ - The value of events occured to the switch.
notifyPortTypeChanged
protected void notifyPortTypeChanged(int portTypes_[])
- Method that notifies the event to all listeners.
- Parameters:
- portTypes_ - The value of events occured to the switch.
All Packages Class Hierarchy This Package Previous Next Index