votorola.a.voter
Class CommandResponder.Session

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<Object,Object>
          extended by CommandResponder.Session
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>, ElectoralSubserver.UserSession
Enclosing interface:
CommandResponder

@ThreadRestricted
public static final class CommandResponder.Session
extends HashMap<Object,Object>
implements ElectoralSubserver.UserSession

A user session in a command response inteface. It is intended for short service, to respond to a single email message, for example, or a single HTTP request. Its facilities include a keyed Map of ad hoc, session-scope variables.

See Also:
Serialized Form

Nested Class Summary
 class CommandResponder.Session.ResponderNameComparator
          A comparator to compare command-responders by commandName.
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
CommandResponder.Session(String userEmail, int userTrustLevel, BundleFormatter bunA, ReplyBuilder replyBuilder)
          Constructs a Session.
 
Method Summary
 BundleFormatter bunA()
          The application (A) bundle formatter for this session.
 ReplyBuilder replyBuilder()
          The command-response (CR) builder to use in replying to commands.
 String userEmail()
          Returns the authenticated email address that identifies the user; or null, if the user is unidentified.
 int userTrustLevel()
          Returns the trust level of the user.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

CommandResponder.Session

public CommandResponder.Session(String userEmail,
                                int userTrustLevel,
                                BundleFormatter bunA,
                                ReplyBuilder replyBuilder)
Constructs a Session.

Parameters:
userEmail - per userEmail()
userTrustLevel - per userTrustLevel()
bunA - per bunA()
replyBuilder - per replyBuilder()
Method Detail

bunA

public BundleFormatter bunA()
The application (A) bundle formatter for this session. It uses bundle base name 'votorola.a.locale.A'.

See Also:
locale/A.properties, replyBuilder()

replyBuilder

public ReplyBuilder replyBuilder()
The command-response (CR) builder to use in replying to commands. It uses bundle base name 'votorola.a.locale.CR'.

See Also:
locale/CR.properties, bunA()

userEmail

public String userEmail()
Description copied from interface: ElectoralSubserver.UserSession
Returns the authenticated email address that identifies the user; or null, if the user is unidentified.

Specified by:
userEmail in interface ElectoralSubserver.UserSession

userTrustLevel

public int userTrustLevel()
Description copied from interface: ElectoralSubserver.UserSession
Returns the trust level of the user.

Specified by:
userTrustLevel in interface ElectoralSubserver.UserSession
See Also:
ListNode.trustLevel()