Class ThreadScope

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.DisposableBean

    @Component("tapirThreadScope")
    public class ThreadScope
    extends java.lang.Object
    implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.DisposableBean
    Thread scope implementation.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadScope()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      java.lang.Object get​(java.lang.String name, org.springframework.beans.factory.ObjectFactory<?> factory)
      Gets bean from scope.
      java.lang.String getConversationId()  
      void registerDestructionCallback​(java.lang.String name, java.lang.Runnable callback)  
      java.lang.Object remove​(java.lang.String name)
      Removes bean from scope.
      java.lang.Object resolveContextualObject​(java.lang.String key)  
      • Methods inherited from class java.lang.Object

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

      • ThreadScope

        public ThreadScope()
        Since:
        2.0.0
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String name,
                                    org.springframework.beans.factory.ObjectFactory<?> factory)
        Gets bean from scope.
        Specified by:
        get in interface org.springframework.beans.factory.config.Scope
        Since:
        2.0.0
      • remove

        public java.lang.Object remove​(java.lang.String name)
        Removes bean from scope.
        Specified by:
        remove in interface org.springframework.beans.factory.config.Scope
        Since:
        2.0.0
      • registerDestructionCallback

        public void registerDestructionCallback​(java.lang.String name,
                                                java.lang.Runnable callback)
        Specified by:
        registerDestructionCallback in interface org.springframework.beans.factory.config.Scope
        Since:
        2.0.0
      • resolveContextualObject

        public java.lang.Object resolveContextualObject​(java.lang.String key)
        Specified by:
        resolveContextualObject in interface org.springframework.beans.factory.config.Scope
        Since:
        2.0.0
      • getConversationId

        public java.lang.String getConversationId()
        Specified by:
        getConversationId in interface org.springframework.beans.factory.config.Scope
        Since:
        2.0.0
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception
        Since:
        2.0.0