org.hd.d.pg2k.webSvr.util
Class WebUtils.VoteHandler

java.lang.Object
  extended by org.hd.d.pg2k.webSvr.util.StatsSink.AbstractStatsListener
      extended by org.hd.d.pg2k.webSvr.util.WebUtils.VoteHandler
All Implemented Interfaces:
java.io.ObjectInputValidation
Enclosing class:
WebUtils

private static final class WebUtils.VoteHandler
extends StatsSink.AbstractStatsListener

Handler for exhibit voting; holds no strong references to anything important.


Field Summary
private  java.lang.String dpID
           
private  Name.ExhibitFull exhibitFullName
           
private  long expireBy
           
private  java.lang.ref.WeakReference<SimpleVariablePipelineIF> varsWR
           
private  java.net.InetAddress voterIPAddr
           
 
Fields inherited from class org.hd.d.pg2k.webSvr.util.StatsSink.AbstractStatsListener
uniqueDataPointID, uniqueListenerID
 
Constructor Summary
private WebUtils.VoteHandler(java.lang.String uniqueDataPointID, long expireBy, Name.ExhibitFull exhibitFullName, java.lang.ref.WeakReference<SimpleVariablePipelineIF> varsWR, java.net.InetAddress voterIPAddr)
           
 
Method Summary
 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).
 
Methods inherited from class org.hd.d.pg2k.webSvr.util.StatsSink.AbstractStatsListener
equals, hashCode, isExpired, validateObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exhibitFullName

private final Name.ExhibitFull exhibitFullName

varsWR

private final java.lang.ref.WeakReference<SimpleVariablePipelineIF> varsWR

dpID

private final java.lang.String dpID

voterIPAddr

private final java.net.InetAddress voterIPAddr

expireBy

private final long expireBy
Constructor Detail

WebUtils.VoteHandler

private WebUtils.VoteHandler(java.lang.String uniqueDataPointID,
                             long expireBy,
                             Name.ExhibitFull exhibitFullName,
                             java.lang.ref.WeakReference<SimpleVariablePipelineIF> varsWR,
                             java.net.InetAddress voterIPAddr)
Method Detail

handle

public final java.lang.String handle(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Description copied from class: StatsSink.AbstractStatsListener
Handle a (non-null) Map of input parameters (String name to String[] value array). Return a redirection URL (or null for no redirection).

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.

Specified by:
handle in class StatsSink.AbstractStatsListener

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.