com.ibm.itim.script.wrappers

Class ObjectWrapperImpl

  • java.lang.Object
    • com.ibm.itim.script.wrappers.ObjectWrapperImpl
  • All Implemented Interfaces:
    DisposeListener, ObjectWrapper


    public abstract class ObjectWrapperImpl
    extends java.lang.Object
    implements ObjectWrapper
    ObjectWrapperImpl serves as a simple base class for more complex classes that wrap Java objects that are represented as JavaScript objects. The ObjectWrapperImpl class itself merely provides the functionality associated with holding a Java object. It is intended that subclasses of the ObjectWrapperImpl class provide the Java interface for the contained Java objects, and that JavaScript objects for those subclasses are constructed using ObjectWrapperManager.
    Since:
    ITIM 5.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Instruct the ObjectWrapper to remove itself from the ObjectWrapperManager, freeing up resources.
      java.lang.String getKey()
      Get the unique key that can be used with the ObjectWrapperManager to get at any object that the implementation of this interface is wrapping.
      void setKey(java.lang.String key)
      Set the unique key that can used with ObjectWrapperManager to get at any object the the implementation of this interface is wrapping.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ObjectWrapperImpl

        public ObjectWrapperImpl()
      • ObjectWrapperImpl

        public ObjectWrapperImpl(java.lang.Object javaObject)
        Constructor with an Object argument.
        Parameters:
        javaObject - The Java object to be contained within the ObjectWrapper.
    • Method Detail

      • dispose

        public void dispose()
        Description copied from interface: ObjectWrapper
        Instruct the ObjectWrapper to remove itself from the ObjectWrapperManager, freeing up resources. Any ObjectWrapper that contains other ObjectWrappers should call dispose on all contained ObjectWrappers.
        Specified by:
        dispose in interface DisposeListener
        Specified by:
        dispose in interface ObjectWrapper
      • getKey

        public java.lang.String getKey()
        Description copied from interface: ObjectWrapper
        Get the unique key that can be used with the ObjectWrapperManager to get at any object that the implementation of this interface is wrapping. This key should only be set by the ObjectWrapperManager.
        Specified by:
        getKey in interface ObjectWrapper
        Returns:
        The unique key used to identify any wrapped object in ObjectWapperManager.
      • setKey

        public void setKey(java.lang.String key)
        Description copied from interface: ObjectWrapper
        Set the unique key that can used with ObjectWrapperManager to get at any object the the implementation of this interface is wrapping. This method should only be used by ObjectWrapperManager.
        Specified by:
        setKey in interface ObjectWrapper
        Parameters:
        key - The key to set for this object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object