Interface HvlSessionService
- All Known Implementing Classes:
HvlSessionRedisServiceImpl
@Validated
public interface HvlSessionService
This service provides operational and retrieve methods.
-
Method Summary
Modifier and TypeMethodDescriptiontr.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 attemptvoid
Clean user (via identifier) session data on key-value data store (redis etc.)void
closeAll()
Clean all session datavoid
Clean all session data associated with username parametervoid
closeAll
(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) Clean all session data associated with session parametervoid
Clean all session data by uservoid
closeAllIdentifiers
(@NotNull List<@NotBlank String> identifierList) Clean all session data associated with list of identifiervoid
closeAllSessions
(@NotNull List<@NotNull tr.com.havelsan.javarch.session.common.model.HvlSession> sessionList) Clean all session data associated with list of sessionvoid
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 controlvoid
closeAllUsers
(@NotNull List<@NotBlank String> usernameList) Clean all session data associated with list of username parametervoid
closeByUser
(@NotBlank String identifier) Clean user (via identifier) session data on key-value data store (redis etc.)Count by current user long.Exist session.List<tr.com.havelsan.javarch.session.common.model.HvlSession>
findAllByUsername
(@NotBlank String username) Get all user session data associated with username parametertr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
Get user session datatr.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
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 identifiersystem
- 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 identifiersystem
- 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.HvlSessionSupportExceptionClean 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.HvlSessionSupportExceptionClean 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 identifiersystem
- the system- Returns:
- the session
- Throws:
tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
- the hvl session support exception
-
exist
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
-