Packages

final class Session extends AnyRef

The state of a given virtual user.

Immutable, so all methods return a new occurrence and leave the original unmodified.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Session
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Session(wrapped: core.session.Session)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asScala(): core.session.Session
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def contains(key: String): Boolean

    Check if the Session contains a given attribute key

    Check if the Session contains a given attribute key

    key

    the attribute key

    returns

    true is the key is defined

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def get[T](key: String): T

    Get a stored value by its key

    Get a stored value by its key

    key

    the storage key

    returns

    the value if it exists, null otherwise

  11. def getBoolean(key: String): Boolean

    Get a stored boolean by its key.

    Get a stored boolean by its key. String representation of Booleans will be parsed.

    key

    the storage key

    returns

    the value if it exists

    Exceptions thrown

    ClassCastException if the value is neither a boolean nor a String

    NullPointerException if the value is undefined

    NumberFormatException if the value is a String that can't be parsed into a boolean

  12. def getBooleanWrapper(key: String): Boolean

    Get a stored Boolean by its key.

    Get a stored Boolean by its key. String representation of Booleans will be parsed.

    key

    the storage key

    returns

    the value if it exists, null otherwise

    Annotations
    @Nullable()
    Exceptions thrown

    ClassCastException if the value is neither a boolean nor a String

    NumberFormatException if the value is a String that can't be parsed into a boolean

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def getDouble(key: String): Double

    Get a stored double by its key.

    Get a stored double by its key. String representation of Doubles will be parsed.

    key

    the storage key

    returns

    the value if it exists

    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NullPointerException if the value is undefined

    NumberFormatException if the value is a String that can't be parsed into a double

  15. def getDoubleWrapper(key: String): Double

    Get a stored Double by its key.

    Get a stored Double by its key. String representation of Doubles will be parsed.

    key

    the storage key

    returns

    the value if it exists, null otherwise

    Annotations
    @Nullable()
    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NumberFormatException if the value is a String that can't be parsed into a double

  16. def getInt(key: String): Int

    Get a stored int by its key

    Get a stored int by its key

    key

    the storage key

    returns

    the value if it exists

    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NullPointerException if the value is undefined

    NumberFormatException if the value is a String that can't be parsed into a int

  17. def getIntegerWrapper(key: String): Integer

    Get a stored Integer by its key.

    Get a stored Integer by its key. String representation of Integers will be parsed.

    key

    the storage key

    returns

    the value if it exists, null otherwise

    Annotations
    @Nullable()
    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NumberFormatException if the value is a String that can't be parsed into a int

  18. def getList[T](key: String): List[T]

    Get a stored List by its key.

    Get a stored List by its key.

    key

    the storage key

    returns

    the value if it exists, an empty List otherwise

    Annotations
    @NonNull() @SuppressWarnings()
    Exceptions thrown

    ClassCastException if the value is not a List

  19. def getLong(key: String): Long

    Get a stored long by its key String representation of Longs will be parsed.

    Get a stored long by its key String representation of Longs will be parsed.

    key

    the storage key

    returns

    the value if it exists

    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NullPointerException if the value is undefined

    NumberFormatException if the value is a String that can't be parsed into a long

  20. def getLongWrapper(key: String): Long

    Get a stored Long by its key.

    Get a stored Long by its key. String representation of Longs will be parsed.

    key

    the storage key

    returns

    the value if it exists, null otherwise

    Annotations
    @Nullable()
    Exceptions thrown

    ClassCastException if the value is neither a number nor a String

    NumberFormatException if the value is a String that can't be parsed into a long

  21. def getMap[T](key: String): Map[String, T]

    Get a stored Map by its key.

    Get a stored Map by its key.

    key

    the storage key

    returns

    the value if it exists, an empty Map otherwise

    Annotations
    @NonNull() @SuppressWarnings()
    Exceptions thrown

    ClassCastException if the value is not a Map

  22. def getSet[T](key: String): Set[T]

    Get a stored Set by its key.

    Get a stored Set by its key.

    key

    the storage key

    returns

    the value if it exists, an empty Set otherwise

    Annotations
    @NonNull() @SuppressWarnings()
    Exceptions thrown

    ClassCastException if the value is not a Set

  23. def getString(key: String): String

    Get a stored String by its key

    Get a stored String by its key

    key

    the storage key

    returns

    the value if it exists, null otherwise

    Annotations
    @Nullable()
  24. def groups(): List[String]

    Provide the list of groups at the current position for the virtual user

    Provide the list of groups at the current position for the virtual user

    returns

    the list of groups, from shallowest to deepest

  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def isFailed(): Boolean

    returns

    if the Session's status is failure

  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def markAsFailed(): Session

    Create a new instance with the status forced to "failed"

    Create a new instance with the status forced to "failed"

    returns

    a new instance with the new status

    Annotations
    @NonNull()
  29. def markAsSucceeded(): Session

    Create a new instance with the status forced to "succeeded"

    Create a new instance with the status forced to "succeeded"

    returns

    a new instance with the new status

    Annotations
    @NonNull()
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def remove(key: String): Session

    Create a new instance updated with an attribute removed

    Create a new instance updated with an attribute removed

    key

    the key of the attribute to remove

    returns

    a new instance with the attribute removed

    Annotations
    @NonNull()
  34. def removeAll(keys: <repeated...>[String]): Session

    Create a new instance updated with multiple attributes removed

    Create a new instance updated with multiple attributes removed

    keys

    the keys of the attributes to remove

    returns

    a new instance with the attributes removed

    Annotations
    @NonNull()
  35. def reset(): Session

    Create a new instance updated with all attributes removed except Gatling internal ones

    Create a new instance updated with all attributes removed except Gatling internal ones

    returns

    a new instance with a reset user state

    Annotations
    @NonNull()
  36. def scenario(): String

    Provide the name of the scenario of the virtual user

    Provide the name of the scenario of the virtual user

    returns

    the virtual user's scenario name

  37. def set(key: String, value: AnyRef): Session

    Create a new instance updated with a given attribute, possibly overriding an existing one

    Create a new instance updated with a given attribute, possibly overriding an existing one

    key

    the attribute key

    value

    the attribute value

    returns

    a new instance with the new stored attribute

    Annotations
    @NonNull()
  38. def setAll(newAttributes: Map[String, AnyRef]): Session

    Create a new instance updated with multiple attributes, possibly overriding existing ones

    Create a new instance updated with multiple attributes, possibly overriding existing ones

    newAttributes

    the new attributes

    returns

    a new instance with the new stored attributes

    Annotations
    @NonNull()
  39. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    Session → AnyRef → Any
    Annotations
    @Override()
  41. def userId(): Long

    Provide the unique (for this injector) id of the virtual user

    Provide the unique (for this injector) id of the virtual user

    returns

    the virtual user's id

  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped