Class ThreadLocalBeansWrapper


  • public class ThreadLocalBeansWrapper
    extends java.lang.Object
    A wrapper class that provides static access to a ThreadLocal controlled map of beans Threads that call setBeans should later be able to call getBeans to retireve the same map of beans, regardless of what any other thread may do in the meantime
    Author:
    Ikasan Development Team
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Object> getBeans()
      Provides access to beans previously set by this thread
      static void remove()
      Clears the threadlocal
      static void setBeans​(java.util.Map<java.lang.String,​java.lang.Object> beans)
      Allows the current thread to set its own private beans for later retrieval
      • Methods inherited from class java.lang.Object

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

      • ThreadLocalBeansWrapper

        public ThreadLocalBeansWrapper()
    • Method Detail

      • getBeans

        public static java.util.Map<java.lang.String,​java.lang.Object> getBeans()
        Provides access to beans previously set by this thread
        Returns:
        Map of named java beans
      • setBeans

        public static void setBeans​(java.util.Map<java.lang.String,​java.lang.Object> beans)
        Allows the current thread to set its own private beans for later retrieval
        Parameters:
        beans - Map of named java beans
      • remove

        public static void remove()
        Clears the threadlocal