public final class AttachmentTokenRegistry extends java.lang.Object implements AttachmentTokenConstants
CLEANER_FREQUENCY, DEFAULT_TIMEOUT| Modifier and Type | Method and Description |
|---|---|
void |
dropFor(int userId,
int contextId)
Drops tokens for given user.
|
void |
dropFor(com.openexchange.session.Session session)
Drops tokens for given session.
|
static AttachmentTokenRegistry |
getInstance()
Gets the singleton instance.
|
AttachmentToken |
getToken(java.lang.String tokenId)
Gets the token for specified token identifier.
|
void |
putToken(AttachmentToken token,
com.openexchange.session.Session session)
Puts specified token into this registry.
|
static void |
releaseInstance()
Releases the singleton instance.
|
void |
removeToken(java.lang.String tokenId)
Removes the token with specified identifier from this registry.
|
public static AttachmentTokenRegistry getInstance() throws com.openexchange.exception.OXException
com.openexchange.exception.OXException - If instance initialization failspublic static void releaseInstance()
public void dropFor(int userId,
int contextId)
userId - The user identifiercontextId - The context identifierpublic void dropFor(com.openexchange.session.Session session)
Session - The sessionpublic void removeToken(java.lang.String tokenId)
tokenId - The token identifierpublic AttachmentToken getToken(java.lang.String tokenId)
tokenId - The token identifiernull if absent or expiredpublic void putToken(AttachmentToken token, com.openexchange.session.Session session)
token - The tokensession - The session providing user data