Package ch.psi.wica.controllers
Class ControllerStatistics
java.lang.Object
ch.psi.wica.controllers.ControllerStatistics
- All Implemented Interfaces:
StatisticsCollectable
Provides statistics related to the Wica Controllers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.psi.wica.model.app.StatisticsCollectable
StatisticsCollectable.Statistics, StatisticsCollectable.StatisticsItem
-
Constructor Summary
ConstructorsConstructorDescriptionControllerStatistics
(String statisticsHeader) Creates a new instance with the specified header. -
Method Summary
Modifier and TypeMethodDescription(package private) void
addClientIpAddr
(String clientIpAddr) Adds the supplied client IP to the list of collected IPs.get()
Returns the statistics associated with the collectable.(package private) void
Increments the count of errors.(package private) void
Increments the count of replies.(package private) void
Increments the count of requests.void
reset()
Resets the statistics.
-
Constructor Details
-
ControllerStatistics
Creates a new instance with the specified header.- Parameters:
statisticsHeader
- the header.
-
-
Method Details
-
get
Description copied from interface:StatisticsCollectable
Returns the statistics associated with the collectable.- Specified by:
get
in interfaceStatisticsCollectable
- Returns:
- the statistics.
-
reset
public void reset()Description copied from interface:StatisticsCollectable
Resets the statistics.- Specified by:
reset
in interfaceStatisticsCollectable
-
incrementRequests
void incrementRequests()Increments the count of requests. -
incrementReplies
void incrementReplies()Increments the count of replies. -
incrementErrors
void incrementErrors()Increments the count of errors. -
addClientIpAddr
Adds the supplied client IP to the list of collected IPs.- Parameters:
clientIpAddr
- the IP to add.
-