Class ForceLogoutProvider
java.lang.Object
io.deephaven.enterprise.webclientdata2.ForceLogoutProvider
Processes ForceLogoutProviderService requests
The requests are:
- RETRIEVE_TABLE: returns a table requested by the web client
- ADD_EVENT: adds a logout event for a user
The tables that can be requested are:
- UserLastEventTable: the last event for a user
- ActiveUsersTable: the active users for editors
Calling ADD_EVENT requires passing in a map with the following keys:
- groupname: String: the group name of the user
- event: String: the event type (logout, ignored, online, offline)
- immediate: Boolean: whether the logout is immediate (or scheduled). Only relevant for logout events.
- kick: Boolean: whether the user should be kicked (or given an opportunity to ignore). Only relevant for logout events.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseConnection(ObjectType.MessageStream connection) Close a user connectionstatic voidcreateAndAddToScope(Database db, GroupProvider groupProvider, QueryScope scope) Create and add a ForceLogoutProvider to the QueryScope.static TableCreate a last event table for a user from the user events input tablehandleRequest(ObjectType.MessageStream connection, String type, String table, Map<String, Object> data) Handle a request from the web clienthandleTableRequest(String table, String user, ObjectType.MessageStream connection) Handle a table request from the web client
-
Field Details
-
SCOPE_NAME
- See Also:
-
USER_LAST_EVENT_TABLE
- See Also:
-
classLogPfx
-
-
Constructor Details
-
ForceLogoutProvider
public ForceLogoutProvider()
-
-
Method Details
-
createAndAddToScope
Create and add a ForceLogoutProvider to the QueryScope. Creates the necessary tables for tracking user sessions and events.- Parameters:
db- the databasegroupProvider- the group providerscope- the QueryScope
-
createLastEventTableFor
Create a last event table for a user from the user events input table- Parameters:
user- the user's name- Returns:
- the last event table for the user
-
handleTableRequest
public Table handleTableRequest(String table, String user, ObjectType.MessageStream connection) throws IllegalArgumentException Handle a table request from the web client- Parameters:
table- the name of the table requesteduser- the user's nameconnection- the MessageStream connection- Returns:
- the requested table
- Throws:
IllegalArgumentException- if the request type is unknown or user is null
-
handleRequest
public Table handleRequest(ObjectType.MessageStream connection, String type, String table, Map<String, Object> data) throws IllegalArgumentExceptionHandle a request from the web client- Parameters:
connection- the MessageStream connectiontype- the request typetable- the name of the table requesteddata- the event data- Returns:
- the requested table, or null for non-table requests
- Throws:
IllegalArgumentException- if the request type is unknown or user is null
-
closeConnection
Close a user connection- Parameters:
connection- the MessageStream connection
-