public class RemoteUserSessionService extends Object implements UserSessionService
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
protected RestTemplate |
restTemplate |
protected static String |
USER_CONNECTED_TEMPLATE |
protected static String |
USER_CONNECTED_WITH_TENANT_TEMPLATE |
protected static String |
USER_DISCONNECTED_TEMPLATE |
protected static String |
USER_DISCONNECTED_WITH_TENANT_TEMPLATE |
protected String |
userStatusBaseUrl |
Constructor and Description |
---|
RemoteUserSessionService(RestTemplate restTemplate,
String userStatusBaseUrl) |
Modifier and Type | Method and Description |
---|---|
void |
userConnected(String userId,
String tenantId,
String sessionId)
Method invoked when the user has been connected in real time to the application
|
void |
userDisconnected(String userId,
String tenantId,
String sessionId)
Method invoked when the user has been disconnected from a single session the application
|
protected static final String USER_CONNECTED_TEMPLATE
protected static final String USER_CONNECTED_WITH_TENANT_TEMPLATE
protected static final String USER_DISCONNECTED_TEMPLATE
protected static final String USER_DISCONNECTED_WITH_TENANT_TEMPLATE
protected final org.slf4j.Logger logger
protected final RestTemplate restTemplate
protected final String userStatusBaseUrl
public RemoteUserSessionService(RestTemplate restTemplate, String userStatusBaseUrl)
public void userConnected(String userId, String tenantId, String sessionId)
UserSessionService
userConnected
in interface UserSessionService
userId
- the id of the user that has connectedtenantId
- the tenant id for the connectionsessionId
- the id of the session that the user is connected topublic void userDisconnected(String userId, String tenantId, String sessionId)
UserSessionService
userDisconnected
in interface UserSessionService
userId
- the id of the user that has been disconnectedtenantId
- the tenant id for the connectionsessionId
- the session id that the user disconnected from