Package com.variant.spi
Interface StateRequest
public interface StateRequest
State request, as returned by
Session.getStateRequest()
. Cannot be directly manipulated by the client code,
i.e. all methods are read-only.- Since:
- 0.7
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLiveExperience
(Experiment experiment) The live experience in a given experiment, if any.Targeted experiences in experiments instrumented on the target state.The resolved state parameters as an immutable map, containing the merged maps of the state parameters defined at the state level and at the state variant level, with the latter taking precedence over former.User session to which this state request belongs.getState()
The target state of this state request.The current status of this state request.
-
Method Details
-
getSession
Session getSession()User session to which this state request belongs.- Returns:
- An object of type
Session
. Cannot be null. - Since:
- 0.7
-
getState
State getState()The target state of this state request.- Returns:
- An object of type
State
. Cannot be null. - Since:
- 0.7
-
getStatus
StateRequest.Status getStatus()The current status of this state request.- Returns:
- An object of type
StateRequest.Status
. Cannot be null. - Since:
- 0.9
-
getLiveExperiences
Set<Experiment.Experience> getLiveExperiences()Targeted experiences in experiments instrumented on the target state. An experience is live iff a) this session has been targeted for it, b) its containing experiment is instrumented on this state, and c) is neither off nor disqualified in this session.
- Returns:
- A
Set
ofExperiment.Experience
objects. Cannot be null, but may be empty. - Since:
- 0.7
-
getResolvedParameters
The resolved state parameters as an immutable map, containing the merged maps of the state parameters defined at the state level and at the state variant level, with the latter taking precedence over former.- Returns:
- Immutable map keyed by parameter names.
- Since:
- 0.7
-