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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
The value returned bygetSize()
if the number of available bytes withingetContent()
is unknown. -
Method Summary
Modifier and TypeMethodDescriptionReturns an InputStream that allows the content of this log to be read.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.getType()
Returns the type of this activity log.
-
Field Details
-
UNKNOWN_SIZE
static final long UNKNOWN_SIZEThe value returned bygetSize()
if the number of available bytes withingetContent()
is unknown.- See Also:
-
-
Method Details
-
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.GuacamoleExceptionReturns 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
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.
-