Class IsolationSource


  • public final class IsolationSource
    extends Object
    Describes where to extract the isolation key from an inbound HTTP request for per-session conversation state isolation.

    Usage:

     isolateBy(IsolationSource.header("x-session-id"))
     isolateBy(IsolationSource.queryParameter("agent"))
     isolateBy(IsolationSource.cookie("sid"))
     
    • Method Detail

      • getName

        public String getName()
      • encode

        public String encode()
        Encode the isolation source as a string for embedding in scenario names. Format: "kind:name" (e.g. "header:x-session-id").
      • decode

        public static IsolationSource decode​(String encoded)
        Decode an isolation source from its encoded string form.
        Parameters:
        encoded - the encoded string (e.g. "header:x-session-id")
        Returns:
        the decoded IsolationSource, or null if the format is invalid
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object