@Singleton
public class IdCookieAccessor
extends java.lang.Object
Internally this class accesses JATOS' ID cookies in the HTTP Request or Response. It stores the extracted
IdCookieModel
in a IdCookieCollection
. Additionally, it puts the IdCookieCollection
in the
RequestScope
for easier retrieval in subsequent calls within the same Request.
Each browser can run up to IdCookieCollection.MAX_ID_COOKIES ID studies at the same time. This means that there is the same number of ID cookies stored in the browser as studies are currently running (although part of them might be abandoned).
Constructor and Description |
---|
IdCookieAccessor(IdCookieSerialiser idCookieSerialiser) |
Modifier and Type | Method and Description |
---|---|
protected void |
discard(long studyResultId)
Discards the ID cookie that corresponds to the given study result ID.
|
protected IdCookieCollection |
extract()
Returns the IdCookieCollection containing all IdCookies of this Request.
|
@Inject public IdCookieAccessor(IdCookieSerialiser idCookieSerialiser)
protected IdCookieCollection extract() throws IdCookieAlreadyExistsException
IdCookieAlreadyExistsException
protected void discard(long studyResultId) throws IdCookieAlreadyExistsException
IdCookieAlreadyExistsException