Package io.ryos.rhino.sdk.data
Interface Context
-
- All Known Subinterfaces:
UserSession
- All Known Implementing Classes:
ContextImpl
,UserSessionImpl
public interface Context
ContextImpl type for storing values throughout a testing session. Each session - and thread respectfully, must have a single context instance bound.- Since:
- 1.0
- Author:
- Erhan Bagdemir
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(java.lang.String key, java.lang.Object value)
Puts a new key - value pair to the context.void
empty()
Empties the context.<T> java.util.Optional<T>
get(java.lang.String key)
Reclaims the object from the context.
-
-
-
Method Detail
-
add
void add(java.lang.String key, java.lang.Object value)
Puts a new key - value pair to the context.- Parameters:
key
- Key value.value
- Value to store.
-
get
<T> java.util.Optional<T> get(java.lang.String key)
Reclaims the object from the context.- Type Parameters:
T
- The value stored in the context of typeT
- Parameters:
key
- The key value.- Returns:
- An
Optional
instance ofT
.
-
empty
void empty()
Empties the context.
-
-