Class ThreadLocalSessionAccessor
java.lang.Object
org.bonitasoft.engine.sessionaccessor.ThreadLocalSessionAccessor
- All Implemented Interfaces:
ReadSessionAccessor,SessionAccessor
Store and access the current session id of the current thread
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidlongGet current session idlongGet the tenant idbooleanvoidsetSessionInfo(long sessionId, long tenantId) voidsetTenantId(long tenantId)
-
Constructor Details
-
ThreadLocalSessionAccessor
public ThreadLocalSessionAccessor()
-
-
Method Details
-
getSessionId
Description copied from interface:ReadSessionAccessorGet current session id- Specified by:
getSessionIdin interfaceReadSessionAccessor- Returns:
- the identifier of current session
- Throws:
SessionIdNotSetException- if no session exists for the given id, throw exception
-
setSessionInfo
public void setSessionInfo(long sessionId, long tenantId) - Specified by:
setSessionInfoin interfaceSessionAccessor
-
setTenantId
public void setTenantId(long tenantId) - Specified by:
setTenantIdin interfaceSessionAccessor
-
deleteSessionId
public void deleteSessionId()- Specified by:
deleteSessionIdin interfaceSessionAccessor
-
deleteTenantId
public void deleteTenantId()- Specified by:
deleteTenantIdin interfaceSessionAccessor
-
isTenantSession
public boolean isTenantSession()- Specified by:
isTenantSessionin interfaceSessionAccessor
-
getTenantId
Description copied from interface:ReadSessionAccessorGet the tenant id- Specified by:
getTenantIdin interfaceReadSessionAccessor- Returns:
- the identifier of the tenant
- Throws:
STenantIdNotSetException- if no tenant exists for the given id, throw exception
-