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
- key
the 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 finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- Annotations
- @SuppressWarnings()
- 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
- 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
- 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
- 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
- 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
- def groups(): List[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 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
Force status to failure
Force status to failure
- returns
the new instance with the new status
- Annotations
- @Nonnull()
- def markAsSucceeded(): Session
Force status to success
Force status to success
- returns
the 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
Remove an existing attribute
Remove an existing attribute
- key
the key to remove
- returns
the new instance with the removed key
- Annotations
- @Nonnull()
- def removeAll(keys: <repeated...>[String]): Session
Remove multiple existing attributes
Remove multiple existing attributes
- keys
the keys to remove
- returns
the new instance with the removed keys
- Annotations
- @Nonnull()
- def reset(): Session
Remove all attributes but Gatling's internal ones
Remove all attributes but Gatling's internal ones
- returns
the 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
Store (possibly override existing value) a value under a key
Store (possibly override existing value) a value under a key
- key
the key
- value
the value to store
- returns
the new instance with the new stored value
- Annotations
- @Nonnull()
- def setAll(newAttributes: Map[String, AnyRef]): Session
Store (possibly override existing values) some key value pairs
Store (possibly override existing values) some key value pairs
- newAttributes
the new attributes
- returns
the new instance with the new stored value
- Annotations
- @Nonnull()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()