Class ObjectHolder

  • All Implemented Interfaces:
    java.io.Serializable

    public class ObjectHolder
    extends ObjectHolderContext
    implements java.io.Serializable
    the object holder to hold object for a while, and remove timeout object when someone kick() it.
    Author:
    Dennis
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectHolder​(jakarta.servlet.http.HttpSession session, int millisecondToKick)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String objectId)
      Gets the object with given id
      void kick()
      Kick this holder to remove timeout object
      void put​(java.lang.String objectId, java.lang.Object object)
      Puts the object with given id
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectHolder

        public ObjectHolder​(jakarta.servlet.http.HttpSession session,
                            int millisecondToKick)
    • Method Detail

      • kick

        public void kick()
        Kick this holder to remove timeout object
      • get

        public java.lang.Object get​(java.lang.String objectId)
        Gets the object with given id
      • put

        public void put​(java.lang.String objectId,
                        java.lang.Object object)
        Puts the object with given id