Interface IUploadSessionContext


public interface IUploadSessionContext
What the upload service needs from the application session it belongs to, as a small interface so the service can be driven in a test without an AppSessionGyro.
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the server settings in force now.
    Gets the application session UUID: the quota key and the sidecar's appSession.
    Gets the authenticated user UUID for the sidecar, metadata only.
    boolean
    Checks if the application session is disposed of.
    boolean
    Whether a plain-HTTP session should be warned about at reservation (production mode only; the per-file secret is a bearer credential resting on TLS).
    boolean
    post(Runnable runnable)
    Posts a runnable to the application session's worker thread.
    void
    showMessageBox(KString title, KString message)
    Shows a message box with an OK button to the clients of the application session, through the session's own message-box queue: a client that cannot be shown it now (disconnected, in the background) is shown it when it next connects, and the queue is discarded with the session.
  • Method Details

    • getSessionUUID

      String getSessionUUID()
      Gets the application session UUID: the quota key and the sidecar's appSession.
      Returns:
      The UUID string.
    • getUserUUID

      String getUserUUID()
      Gets the authenticated user UUID for the sidecar, metadata only.
      Returns:
      The user UUID, or empty for an undefined user.
    • isDisposed

      boolean isDisposed()
      Checks if the application session is disposed of.
      Returns:
      true if disposed.
    • post

      boolean post(Runnable runnable)
      Posts a runnable to the application session's worker thread.
      Parameters:
      runnable - The runnable.
      Returns:
      true if posted, false if the worker is gone.
    • getServerSettings

      ServerSettings getServerSettings()
      Gets the server settings in force now.
      Returns:
      The settings.
    • isPlainHttpInProduction

      boolean isPlainHttpInProduction()
      Whether a plain-HTTP session should be warned about at reservation (production mode only; the per-file secret is a bearer credential resting on TLS).
      Returns:
      true if the session is on plain HTTP and the server runs in production mode.
    • showMessageBox

      void showMessageBox(KString title, KString message)
      Shows a message box with an OK button to the clients of the application session, through the session's own message-box queue: a client that cannot be shown it now (disconnected, in the background) is shown it when it next connects, and the queue is discarded with the session. Called on the session's worker thread.
      Parameters:
      title - The title.
      message - The message.