public class ExperimentContextImpl extends AbstractContextImpl implements ExperimentContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CONTEXT_NAME
This is the name of the context.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ExperimentContextImpl()
The default constructor for this class, a new java.util.HashMap object is created to store user-specific experiment results.
|
Modifier and Type | Method and Description |
---|---|
void | clearContext()
This method clears the experiment context, it is called when the ContextSPI object is returned to their respective object pool.
|
void | copyContext(Context ctx)
This method copies the content of the specified context to this context.
|
java.lang.Object[] | getContextAttributes()
This method returns an array of context attributes to be serialized and persisted.
|
java.lang.String | getContextName()
This method returns the name of this context.
|
java.lang.Short | getExperimentResult(java.lang.Integer experimentId)
This method returns the result of the given experiment for the user who owns this context.
|
java.lang.String | getSessionId()
This method returns the current session ID for the user who is accessing this context.
|
void | initializeContext(ActivityData initData)
This initializes the context when the session is created.
|
void | preInvokeContext(ActivityData sessionData)
Any pre-processing that is done before the request processed.
|
void | setContextAttributes(java.lang.String[] ctxAttrs)
This method initializes the context from the specified list of attributes.
|
void | setExperimentResult(java.lang.Integer experimentId, java.lang.Short newExperimentResult)
This method sets the result of the given experiment for the user who owns this context.
|
void | setSessionId(java.lang.String newSessionId)
This method sets the current session ID for the user who is accessing this context.
|
java.lang.String | toString()
This method returns the string representation of the object.
|
boolean | validate()
This method returns whether the context is valid.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CONTEXT_NAME
public ExperimentContextImpl()
public void clearContext()
public void copyContext(Context ctx)
public java.lang.Object[] getContextAttributes() throws BusinessContextException
public java.lang.String getContextName()
public java.lang.Short getExperimentResult(java.lang.Integer experimentId)
public java.lang.String getSessionId()
public void initializeContext(ActivityData initData) throws BusinessContextException
public void preInvokeContext(ActivityData sessionData) throws BusinessContextException
public void setContextAttributes(java.lang.String[] ctxAttrs) throws BusinessContextException
public void setExperimentResult(java.lang.Integer experimentId, java.lang.Short newExperimentResult)
public void setSessionId(java.lang.String newSessionId)
public java.lang.String toString()
public boolean validate() throws BusinessContextException