PageMixer API - 3.1

jp.ne.dti.lares.foozy.pagemixer.mixer
Class HashMapConsumerContext

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.mixer.HashMapConsumerContext
All Implemented Interfaces:
ConsumerContext

public class HashMapConsumerContext
extends java.lang.Object
implements ConsumerContext

Consumer context implementation for ordinal use.

This is consumer context implementation by java.util.HashMap for general use.


Constructor Summary
HashMapConsumerContext()
          Construct.
HashMapConsumerContext(java.lang.String sessionID)
          Construct.
HashMapConsumerContext(java.lang.String sessionID, java.lang.String encoding)
          Construct.
 
Method Summary
 java.lang.String encode(java.lang.String url)
          Get encoded URL string to include the session ID.
 java.lang.Object getValue(java.lang.Object key)
          Get value by java.util.HashMap#get.
 void setValue(java.lang.Object key, java.lang.Object value)
          Set value by java.util.HashMap#put.
 void unsetValue(java.lang.Object key)
          Un-set value by java.util.HashMap#remove.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMapConsumerContext

public HashMapConsumerContext(java.lang.String sessionID,
                              java.lang.String encoding)
Construct.
Parameters:
sessionID - value to encode URL.
encoding - to encode non-ascii characters in URL
Since:
PageMixer 3.0

HashMapConsumerContext

public HashMapConsumerContext()
Construct.

HashMapConsumerContext

public HashMapConsumerContext(java.lang.String sessionID)
Construct.
Parameters:
sessionID - value to encode URL.
Method Detail

getValue

public java.lang.Object getValue(java.lang.Object key)
Get value by java.util.HashMap#get.
Specified by:
getValue in interface ConsumerContext
Parameters:
key - key to identify value
Returns:
value identified by key(may be null)

setValue

public void setValue(java.lang.Object key,
                     java.lang.Object value)
Set value by java.util.HashMap#put.
Specified by:
setValue in interface ConsumerContext
Parameters:
key - key to identify value
value - value identified by key

unsetValue

public void unsetValue(java.lang.Object key)
Un-set value by java.util.HashMap#remove.
Specified by:
unsetValue in interface ConsumerContext
Parameters:
key - key to identify value

encode

public java.lang.String encode(java.lang.String url)
Get encoded URL string to include the session ID.
Specified by:
encode in interface ConsumerContext
Parameters:
url - URL to encode
Returns:
encoded URL string

PageMixer API - 3.1