Class ForceLogoutProvider

java.lang.Object
io.deephaven.enterprise.webclientdata2.ForceLogoutProvider

public class ForceLogoutProvider extends Object
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 Details

  • Constructor Details

    • ForceLogoutProvider

      public ForceLogoutProvider()
  • Method Details

    • createAndAddToScope

      public static void createAndAddToScope(Database db, GroupProvider groupProvider, QueryScope scope)
      Create and add a ForceLogoutProvider to the QueryScope. Creates the necessary tables for tracking user sessions and events.
      Parameters:
      db - the database
      groupProvider - the group provider
      scope - the QueryScope
    • createLastEventTableFor

      public static Table createLastEventTableFor(String user)
      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 requested
      user - the user's name
      connection - 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 IllegalArgumentException
      Handle a request from the web client
      Parameters:
      connection - the MessageStream connection
      type - the request type
      table - the name of the table requested
      data - 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

      public void closeConnection(ObjectType.MessageStream connection)
      Close a user connection
      Parameters:
      connection - the MessageStream connection