Class TokenMgrImplInProcessMap

java.lang.Object
org.eclnt.util.token.TokenMgrImplInProcessMap
All Implemented Interfaces:
ITokenMgr
Direct Known Subclasses:
TokenMgrImplByStreamStore

public class TokenMgrImplInProcessMap extends Object implements ITokenMgr
Management of tokens - "abbreviations" which hide a content string.

Tokens e.g. are used as URL parameter: instead of appending content data to a URL, the content data is arranged behind a token, which is stored in the TokenMgr. The URL only contains the token - and the receiving side has to read the information from the TokenMgr.
  • Field Details

    • MAX_TOKEN_VALIDITYDURATION

      public static final long MAX_TOKEN_VALIDITYDURATION
      See Also:
  • Constructor Details

    • TokenMgrImplInProcessMap

      public TokenMgrImplInProcessMap()
  • Method Details

    • createToken

      public Token createToken(String content)
      Specified by:
      createToken in interface ITokenMgr
    • pullToken

      public Token pullToken(String uuid)
      Reads a token and removes it from the TokenMgr.
      Specified by:
      pullToken in interface ITokenMgr
    • getToken

      public Token getToken(String uuid)
      Reads a token without removing it from the TokenMgr.
      Specified by:
      getToken in interface ITokenMgr
    • readToken

      protected Token readToken(String uuid)
    • saveToken

      protected void saveToken(Token result)
    • deleteToken

      protected void deleteToken(String uuid)
    • cleanUpUnusedTokens

      protected void cleanUpUnusedTokens()
    • cleanUpUnusedTokensExecute

      protected void cleanUpUnusedTokensExecute()
    • checkIfTokenIsTimedOut

      protected boolean checkIfTokenIsTimedOut(Token token)