Class JsonDeleteTokenManager

java.lang.Object
jmri.server.json.JsonDeleteTokenManager

Manager for deletion tokens in the JSON protocols. This is a separate manager to be able to support the RESTful API where the connection where a token is generated may be broken before the client's deletion request containing the token is sent.

Note this is package private and is not part of a committed to API.

Since:
4.15.6
  • Constructor Details

  • Method Details

    • getDefault

      Use this method to access the default instance. This ensures that public API does not need to be exposed for InstanceManagerAutoDefault to function.
      Returns:
      the default instance
    • acceptToken

      Accept a token. If the token is not valid, any valid token is also invalidated.
      Parameters:
      type - the type of the object to delete
      name - the name of the object to delete
      token - the token to test
      Returns:
      true if the token was accepted; false otherwise
    • getToken

      Generate a token to allow deletion following the rejection of a deletion request.
      Parameters:
      type - the type of the object to delete
      name - the name of the object to delete
      Returns:
      the token to use to confirm a deletion should be accepted