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 TypeMethodDescriptionGets the server settings in force now.Gets the application session UUID: the quota key and the sidecar'sappSession.Gets the authenticated user UUID for the sidecar, metadata only.booleanChecks if the application session is disposed of.booleanWhether a plain-HTTP session should be warned about at reservation (production mode only; the per-file secret is a bearer credential resting on TLS).booleanPosts a runnable to the application session's worker thread.voidshowMessageBox(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'sappSession.- 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
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
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
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.