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.
- Alphabetic
- By Inheritance
- Session
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Session(wrapped: core.session.Session)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asScala(): core.session.Session
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- 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
ClassCastExceptionif the value is neither a boolean nor a StringNullPointerExceptionif the value is undefinedNumberFormatExceptionif the value is a String that can't be parsed into a boolean
- def getBooleanWrapper(key: String): Boolean
Get a stored
Booleanby its key.Get a stored
Booleanby 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
ClassCastExceptionif the value is neither a boolean nor a StringNumberFormatExceptionif the value is a String that can't be parsed into a boolean
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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
ClassCastExceptionif the value is neither a number nor a StringNullPointerExceptionif the value is undefinedNumberFormatExceptionif the value is a String that can't be parsed into a double
- def getDoubleWrapper(key: String): Double
Get a stored
Doubleby its key.Get a stored
Doubleby 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
ClassCastExceptionif the value is neither a number nor a StringNumberFormatExceptionif the value is a String that can't be parsed into a double
- 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
ClassCastExceptionif the value is neither a number nor a StringNullPointerExceptionif the value is undefinedNumberFormatExceptionif the value is a String that can't be parsed into a int
- def getIntegerWrapper(key: String): Integer
Get a stored
Integerby its key.Get a stored
Integerby 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
ClassCastExceptionif the value is neither a number nor a StringNumberFormatExceptionif the value is a String that can't be parsed into a int
- def getList[T](key: String): List[T]
Get a stored
Listby its key.Get a stored
Listby its key.- key
the storage key
- returns
the value if it exists, an empty List otherwise
- Annotations
- @NonNull() @SuppressWarnings()
- Exceptions thrown
ClassCastExceptionif the value is not a List
- 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
ClassCastExceptionif the value is neither a number nor a StringNullPointerExceptionif the value is undefinedNumberFormatExceptionif the value is a String that can't be parsed into a long
- def getLongWrapper(key: String): Long
Get a stored
Longby its key.Get a stored
Longby 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
ClassCastExceptionif the value is neither a number nor a StringNumberFormatExceptionif the value is a String that can't be parsed into a long
- def getMap[T](key: String): Map[String, T]
Get a stored
Mapby its key.Get a stored
Mapby its key.- key
the storage key
- returns
the value if it exists, an empty Map otherwise
- Annotations
- @NonNull() @SuppressWarnings()
- Exceptions thrown
ClassCastExceptionif the value is not a Map
- def getSet[T](key: String): Set[T]
Get a stored
Setby its key.Get a stored
Setby its key.- key
the storage key
- returns
the value if it exists, an empty Set otherwise
- Annotations
- @NonNull() @SuppressWarnings()
- Exceptions thrown
ClassCastExceptionif the value is not a Set
- 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()
- 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
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isFailed(): Boolean
- returns
if the Session's status is failure
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- 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()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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()
- 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()
- 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()
- 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
- 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()
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Session → AnyRef → Any
- Annotations
- @Override()
- 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
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()