Package org.apache.guacamole.net.auth
Interface ActivityLog
-
- All Known Implementing Classes:
AbstractActivityLog
,FileActivityLog
public interface ActivityLog
An arbitrary log of an activity whose content may be exposed to a user with sufficient privileges. Types of content that might be exposed in this way include textual server logs, Guacamole session recordings, and typescripts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ActivityLog.Type
All possible types ofActivityLog
.
-
Field Summary
Fields Modifier and Type Field Description static long
UNKNOWN_SIZE
The value returned bygetSize()
if the number of available bytes withingetContent()
is unknown.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
getContent()
Returns an InputStream that allows the content of this log to be read.TranslatableMessage
getDescription()
Returns a human-readable message that describes this log.long
getSize()
Returns the number of bytes available for reading within the content of this log.ActivityLog.Type
getType()
Returns the type of this activity log.
-
-
-
Field Detail
-
UNKNOWN_SIZE
static final long UNKNOWN_SIZE
The value returned bygetSize()
if the number of available bytes withingetContent()
is unknown.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
ActivityLog.Type getType()
Returns the type of this activity log. The type of an activity log dictates how its content should be interpreted or exposed.- Returns:
- The type of this activity log.
-
getDescription
TranslatableMessage getDescription()
Returns a human-readable message that describes this log. This message should provide sufficient information for a user with access to this log to understand its context and/or purpose.- Returns:
- A human-readable message that describes this log.
-
getSize
long getSize() throws org.apache.guacamole.GuacamoleException
Returns the number of bytes available for reading within the content of this log. If this value is unknown, -1 (UNKNOWN_SIZE
) should be returned.- Returns:
- The number of bytes available for reading within the content of
this log, or -1 (
UNKNOWN_SIZE
) if this value is unknown. - Throws:
org.apache.guacamole.GuacamoleException
- If the size of the content of this log cannot be determined due to an error.
-
getContent
InputStream getContent() throws org.apache.guacamole.GuacamoleException
Returns an InputStream that allows the content of this log to be read. Multiple instances of this InputStream may be open at any given time. It is the responsibility of the caller to close the returned InputStream.- Returns:
- An InputStream that allows the content of this log to be read.
- Throws:
org.apache.guacamole.GuacamoleException
- If the content of this log cannot be read due to an error.
-
-