Class ThreadContext


  • public class ThreadContext
    extends java.lang.Object
    Storage that stores information about not finished tests and steps.
    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Removes all the data stored for current thread.
      java.util.Optional<java.lang.String> getCurrent()
      Returns last (most recent) uuid.
      java.util.Optional<java.lang.String> getRoot()
      Returns first (oldest) uuid.
      void start​(java.lang.String uuid)
      Adds new uuid.
      java.util.Optional<java.lang.String> stop()
      Removes latest added uuid.
      • Methods inherited from class java.lang.Object

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

      • ThreadContext

        public ThreadContext()
    • Method Detail

      • getCurrent

        public java.util.Optional<java.lang.String> getCurrent()
        Returns last (most recent) uuid.
        Returns:
        last uuid.
      • getRoot

        public java.util.Optional<java.lang.String> getRoot()
        Returns first (oldest) uuid.
        Returns:
        first uuid.
      • start

        public void start​(java.lang.String uuid)
        Adds new uuid.
        Parameters:
        uuid - the value
      • stop

        public java.util.Optional<java.lang.String> stop()
        Removes latest added uuid. Ignores empty context.
        Returns:
        removed uuid.
      • clear

        public void clear()
        Removes all the data stored for current thread.