|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.util.StatsSink.AbstractStatsListener
public abstract static class StatsSink.AbstractStatsListener
Abstract/base listener object waiting for stats to arrive. This has an embedded unique listener ID, cryptographically generated, and pure-alphanumeric-ASCII suitable for embedding in URLs, etc.
| Field Summary | |
|---|---|
private long |
expireBy
Date/time that we expire by (ms). |
java.lang.String |
uniqueDataPointID
Unique data-point identifier: not more than one listener with given ID can exist at once; never null nor empty. |
java.lang.String |
uniqueListenerID
Unique listener ID: unique-for-all-time pure-alphanumeric-ASCII identifier for this listener. |
| Constructor Summary | |
|---|---|
StatsSink.AbstractStatsListener(java.lang.String uniqueDataPointID,
long expireBy)
Construct an instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality is on just the data point ID. |
abstract java.lang.String |
handle(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Handle a (non-null) Map of input parameters (String name to String[] value array). |
int |
hashCode()
The hash is based on the data point ID. |
boolean |
isExpired()
Returns true if this listener has expired. |
void |
validateObject()
Check state is valid; complain if not. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String uniqueListenerID
Generated from a cryptographically-secure source, so should not be possible to guess in advance.
The use of this may make creation of instances of this class expensive.
public final java.lang.String uniqueDataPointID
Note therefore that this is not a unique-for-all-time identifier, but rather a unique-data-point-to-collect identifier.
private final long expireBy
| Constructor Detail |
|---|
public StatsSink.AbstractStatsListener(java.lang.String uniqueDataPointID,
long expireBy)
uniqueDataPointID - unique data-point identifier for a data point to collect,
only one data point with this name can be requested at any one time
any previous one being ignored for example; never null nor emptyexpireBy - time by which this listener should expire
regardless of whether the listened-for data point has arrived;
strictly positive| Method Detail |
|---|
public boolean isExpired()
public abstract java.lang.String handle(java.util.Map<java.lang.String,java.lang.String[]> parameters)
The ID string will generally be amongst the properties in its external form.
As a side-effect, this should so what ever processing it needs in order to record the data point.
By default, this listener instance is removed once this routine has been called.
The ID (and thus this data point) has already been validated by the time that this call is made.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public void validateObject()
throws java.io.InvalidObjectException
validateObject in interface java.io.ObjectInputValidationjava.io.InvalidObjectException
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||