|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.moskito.core.dynamic.OnDemandStatsProducer
public class OnDemandStatsProducer
This producer is used when the different method producing stats aren't known at compile time (or you don't want to use them). It is used by the InvocationProxy to add methods dynamically as they being called, but also by the filters, like RequestURIFilter dynamically adding a stat for each new uri.
| Field Summary | |
|---|---|
private List<IStats> |
_cachedStatsList
A cached stat list for faster access. |
private String |
category
The variable where the category of this producer, given as parameter upon creation, is stored. |
private CreationInfo |
creationInfo
CreationInfo object initialized on startup. |
private IOnDemandStatsFactory |
factory
The factory for stat creation. |
private IStats |
linkToDefaultStats
A fast access variable for default (cumulated) stats. |
private static org.apache.log4j.Logger |
log
|
private String |
producerId
The variable where the producerId of this producer, given as parameter upon creation, is stored. |
private Map<String,IStats> |
stats
A map where all stat and their ids (strings) are being stored. |
private String |
subsystem
The variable where the subsystem of this producer, given as parameter upon creation, is stored. |
| Constructor Summary | |
|---|---|
OnDemandStatsProducer(String aProducerId,
String aCategory,
String aSubsystem,
IOnDemandStatsFactory aStatsFactory)
Creates a new OnDemandStatsProducer instance. |
|
| Method Summary | |
|---|---|
protected List<IStats> |
getCachedStatsList()
|
String |
getCategory()
Returns the category of this producer. |
CreationInfo |
getCreationInfo()
|
IStats |
getDefaultStats()
|
String |
getProducerId()
Returns the meaningful id of this producer. |
protected String |
getProducerNameExtension()
|
List<IStats> |
getStats()
Returns the list of all stats. |
IStats |
getStats(String name)
|
String |
getSubsystem()
Returns the subsystem the current producer is located in. |
protected boolean |
limitForNewEntriesReached()
The getStats method checked whether the limit is reached before creating a new stat object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static org.apache.log4j.Logger log
private IOnDemandStatsFactory factory
private List<IStats> _cachedStatsList
private Map<String,IStats> stats
private IStats linkToDefaultStats
private String category
private String producerId
private String subsystem
private CreationInfo creationInfo
| Constructor Detail |
|---|
public OnDemandStatsProducer(String aProducerId,
String aCategory,
String aSubsystem,
IOnDemandStatsFactory aStatsFactory)
aProducerId - a producer idaCategory - a categoryaSubsystem - a subsystemaStatsFactory - a factory for IStat object creation.| Method Detail |
|---|
public IStats getStats(String name)
throws OnDemandStatsProducerException
OnDemandStatsProducerExceptionpublic String getCategory()
IStatsProducer
getCategory in interface IStatsProducerpublic String getProducerId()
IStatsProducer
getProducerId in interface IStatsProducerpublic List<IStats> getStats()
IStatsProducer
getStats in interface IStatsProducerpublic String getSubsystem()
IStatsProducer
getSubsystem in interface IStatsProducerpublic IStats getDefaultStats()
public String toString()
toString in class Objectprotected boolean limitForNewEntriesReached()
protected String getProducerNameExtension()
protected List<IStats> getCachedStatsList()
public CreationInfo getCreationInfo()
getCreationInfo in interface Inspectable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||