com.ibm.commerce.me.datatype

Class SupplierCookieTable

  • java.lang.Object
    • java.util.Dictionary<K,V>
      • java.util.Hashtable
        • com.ibm.commerce.me.datatype.SupplierCookieTable
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map


    public class SupplierCookieTable
    extends java.util.Hashtable
    implements java.io.Serializable, java.lang.Cloneable
    This stores the BuyerRequestInfo based on a cookie as a key. It provides thread safe get and put methods to access the stored objects. It also has an inner class which cleans up the table periodically.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field
      static java.lang.String PLUS_STRING_CONSTANT
      Value of '+' as a string.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear() 
      boolean containsKey(java.lang.Object arg0) 
      java.lang.Object get(java.lang.Object arg0) 
      BuyerRequestInfo get(java.lang.String e_supplierCookie)
      This method retrieves the buyer information from the cookie table using a supplier cookie.
      static SupplierCookieTable getInstance()
      This method gets the singleton instance to obtain a handle to the supplier cookie table.
      java.util.Enumeration keys() 
      java.lang.String put(BuyerRequestInfo requestInfo)
      This method creates a new supplier cookie and adds the buyer information into the cookie table.
      java.lang.Object put(java.lang.Object arg0, java.lang.Object arg1) 
      java.lang.Object remove(java.lang.Object arg0) 
      int size() 
      java.lang.String toString() 
      • Methods inherited from class java.util.Hashtable

        clone, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, values
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field
        See Also:
        Constant Field Values
      • PLUS_STRING_CONSTANT

        public static final java.lang.String PLUS_STRING_CONSTANT
        Value of '+' as a string.
        See Also:
        Constant Field Values
    • Method Detail

      • get

        public BuyerRequestInfo get(java.lang.String e_supplierCookie)
                             throws java.lang.Exception
        This method retrieves the buyer information from the cookie table using a supplier cookie.

        Note : this method is thread safe as it is synchronized

        Parameters:
        e_supplierCookie - the encrypted supplier cookie.
        Returns:
        the information of the request from the buyer.
        Throws:
        java.lang.Exception - raised when an error is encountered.
      • getInstance

        public static SupplierCookieTable getInstance()
        This method gets the singleton instance to obtain a handle to the supplier cookie table.
        Returns:
        an instance of Supplier cookie
      • put

        public java.lang.String put(BuyerRequestInfo requestInfo)
        This method creates a new supplier cookie and adds the buyer information into the cookie table.

        Note : this method is thread safe as it is synchronized

        Parameters:
        requestInfo - the buyer request information.
        Returns:
        the newly generated cookie for the supplier used as a key for the buyer request information stored.
      • containsKey

        public boolean containsKey(java.lang.Object arg0)
        Specified by:
        containsKey in interface java.util.Map
        Overrides:
        containsKey in class java.util.Hashtable
      • get

        public java.lang.Object get(java.lang.Object arg0)
        Specified by:
        get in interface java.util.Map
        Overrides:
        get in class java.util.Hashtable
      • put

        public java.lang.Object put(java.lang.Object arg0,
                                    java.lang.Object arg1)
        Specified by:
        put in interface java.util.Map
        Overrides:
        put in class java.util.Hashtable
      • remove

        public java.lang.Object remove(java.lang.Object arg0)
        Specified by:
        remove in interface java.util.Map
        Overrides:
        remove in class java.util.Hashtable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.Hashtable
      • keys

        public java.util.Enumeration keys()
        Overrides:
        keys in class java.util.Hashtable
      • size

        public int size()
        Specified by:
        size in interface java.util.Map
        Overrides:
        size in class java.util.Hashtable
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map
        Overrides:
        clear in class java.util.Hashtable