PageMixer API - 3.1

jp.ne.dti.lares.foozy.pagemixer.mixer
Interface ConsumerContext

All Known Implementing Classes:
HashMapConsumerContext, ServletConsumerContext

public interface ConsumerContext

Abstraction of acces to context shared by token consumer(s).

Some token consumers need parameter to do own processing. Those parameters can not be prepared, because those often depend on execution context (e.g.: request parameters from HttpServletRequest#getParameter).

There should be many ways to hold those context depend parameters - means "you can hold those in many ways" -, and so, context access implementations should be hidden.

This interface provides abstraction of accessing to context depend parameters.

The key which you must specify to identify parameter on accessing those is not typed as String but as Object. This allows you to divide parameter space, and to access parameters in each spaces efficiently.

See Also:
ServletConsumerContext

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 identified by key.
 void setValue(java.lang.Object key, java.lang.Object value)
          Set value identified by key.
 void unsetValue(java.lang.Object key)
          Un-set value identified by key.
 

Method Detail

getValue

public java.lang.Object getValue(java.lang.Object key)
Get value identified by key.
Parameters:
key - key to identify value(may be null)
Returns:
value identified by key

setValue

public void setValue(java.lang.Object key,
                     java.lang.Object value)
Set value identified by key.
Parameters:
key - key to identify value(may be null)
value - value identified by key

unsetValue

public void unsetValue(java.lang.Object key)
Un-set value identified by key.
Parameters:
key - key to identify value(may be null)

encode

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

PageMixer API - 3.1