Interface HvlSessionService

All Known Implementing Classes:
HvlSessionRedisServiceImpl

@Validated public interface HvlSessionService
This service provides operational and retrieve methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    begin(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession)
    Stores user required session data on key-value data store (redis etc.) after success login attempt
    void
    close(@NotBlank String identifier)
    Clean user (via identifier) session data on key-value data store (redis etc.)
    void
    Clean all session data
    void
    closeAll(@NotBlank String username)
    Clean all session data associated with username parameter
    void
    closeAll(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession)
    Clean all session data associated with session parameter
    void
    Clean all session data by user
    void
    closeAllIdentifiers(@NotNull List<@NotBlank String> identifierList)
    Clean all session data associated with list of identifier
    void
    closeAllSessions(@NotNull List<@NotNull tr.com.havelsan.javarch.session.common.model.HvlSession> sessionList)
    Clean all session data associated with list of session
    void
    closeAllSessionsByUser(@NotNull List<@NotNull tr.com.havelsan.javarch.session.common.model.HvlSession> sessionList)
    Clean all session data associated with list of session with current user control
    void
    closeAllUsers(@NotNull List<@NotBlank String> usernameList)
    Clean all session data associated with list of username parameter
    void
    closeByUser(@NotBlank String identifier)
    Clean user (via identifier) session data on key-value data store (redis etc.)
    Count by current user long.
    exist(@NotBlank String identifier)
    Exist session.
    List<tr.com.havelsan.javarch.session.common.model.HvlSession>
    findAllByUsername(@NotBlank String username)
    Get all user session data associated with username parameter
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    get(@NotBlank String identifier, boolean system)
    Get user session data
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    getWithRenewTtl(@NotBlank String identifier, boolean system)
    Get security session with renewing ttl.
    tr.com.havelsan.javarch.data.commons.pageable.HvlPage<tr.com.havelsan.javarch.session.common.model.HvlSession>
    queryPage(@NotNull HvlSessionQueryModel sessionQueryModel)
    Query page hvl page.
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    renewTtl(@NotBlank String identifier, boolean system)
    Renew session time.
  • Method Details

    • begin

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession begin(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Stores user required session data on key-value data store (redis etc.) after success login attempt
      Parameters:
      securitySession - the session
      Returns:
      the hvl session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • renewTtl

      @Retryable(value=tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException.class, maxAttemptsExpression="${hvl.session.service.renew.max-attempts:3}", backoff=@Backoff(delayExpression="${hvl.session.service.renew.delay-expression:100}")) tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession renewTtl(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Renew session time.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the hvl session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • getWithRenewTtl

      @Retryable(value=tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException.class, maxAttemptsExpression="${hvl.session.service.renew.max-attempts:3}", backoff=@Backoff(delayExpression="${hvl.session.service.renew.delay-expression:100}")) tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession getWithRenewTtl(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Get security session with renewing ttl.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the hvl security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • close

      void close(@NotBlank @NotBlank String identifier) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean user (via identifier) session data on key-value data store (redis etc.)
      Parameters:
      identifier - the identifier
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeByUser

      void closeByUser(@NotBlank @NotBlank String identifier) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean user (via identifier) session data on key-value data store (redis etc.)
      Parameters:
      identifier - the identifier
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll() throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllByUser

      void closeAllByUser() throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data by user
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll(@NotBlank @NotBlank String username) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with username parameter
      Parameters:
      username - the username
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with session parameter
      Parameters:
      securitySession - the session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllUsers

      void closeAllUsers(@NotNull @NotNull List<@NotBlank String> usernameList) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with list of username parameter
      Parameters:
      usernameList - the username list
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllIdentifiers

      void closeAllIdentifiers(@NotNull @NotNull List<@NotBlank String> identifierList) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with list of identifier
      Parameters:
      identifierList - the identifier list
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllSessions

      void closeAllSessions(@NotNull @NotNull List<@NotNull tr.com.havelsan.javarch.session.common.model.HvlSession> sessionList) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with list of session
      Parameters:
      sessionList - the session list
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllSessionsByUser

      void closeAllSessionsByUser(@NotNull @NotNull List<@NotNull tr.com.havelsan.javarch.session.common.model.HvlSession> sessionList) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Clean all session data associated with list of session with current user control
      Parameters:
      sessionList - the session list
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • get

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession get(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Get user session data
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • exist

      Boolean exist(@NotBlank @NotBlank String identifier)
      Exist session.
      Parameters:
      identifier - the identifier
      Returns:
      the boolean
    • findAllByUsername

      List<tr.com.havelsan.javarch.session.common.model.HvlSession> findAllByUsername(@NotBlank @NotBlank String username) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Get all user session data associated with username parameter
      Parameters:
      username - the username
      Returns:
      the session list
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • queryPage

      tr.com.havelsan.javarch.data.commons.pageable.HvlPage<tr.com.havelsan.javarch.session.common.model.HvlSession> queryPage(@NotNull @NotNull HvlSessionQueryModel sessionQueryModel) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Query page hvl page.
      Parameters:
      sessionQueryModel - the session query model
      Returns:
      the page
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • countByCurrentUser

      Long countByCurrentUser()
      Count by current user long.
      Returns:
      the long