public class RemoteUserSessionService extends Object implements UserSessionService
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
protected org.springframework.web.client.RestTemplate |
restTemplate |
protected static String |
USER_CONNECTED_TEMPLATE |
protected static String |
USER_DISCONNECTED_TEMPLATE |
protected String |
userStatusBaseUrl |
Constructor and Description |
---|
RemoteUserSessionService(org.springframework.web.client.RestTemplate restTemplate,
String userStatusBaseUrl) |
Modifier and Type | Method and Description |
---|---|
void |
userConnected(String userId,
String sessionId)
Method invoked when the user has been connected in real time to the application
|
void |
userDisconnected(String userId,
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_DISCONNECTED_TEMPLATE
protected final org.slf4j.Logger logger
protected final org.springframework.web.client.RestTemplate restTemplate
protected final String userStatusBaseUrl
public RemoteUserSessionService(org.springframework.web.client.RestTemplate restTemplate, String userStatusBaseUrl)
public void userConnected(String userId, String sessionId)
UserSessionService
userConnected
in interface UserSessionService
userId
- the id of the user that has connectedsessionId
- the id of the session that the user is connected topublic void userDisconnected(String userId, String sessionId)
UserSessionService
userDisconnected
in interface UserSessionService
userId
- the id of the user that has been disconnectedsessionId
- the session id that the user disconnected fromCopyright © 2019. All rights reserved.