Package org.apache.guacamole.net.auth
Class DelegatingActivityRecord
- java.lang.Object
-
- org.apache.guacamole.net.auth.DelegatingActivityRecord
-
- All Implemented Interfaces:
ActivityRecord
,ReadableAttributes
- Direct Known Subclasses:
DelegatingConnectionRecord
public class DelegatingActivityRecord extends Object implements ActivityRecord
ActivityRecord implementation which simply delegates all function calls to an underlying ActivityRecord.
-
-
Constructor Summary
Constructors Constructor Description DelegatingActivityRecord(ActivityRecord record)
Wraps the given ActivityRecord such that all function calls against this DelegatingActivityRecord will be delegated to it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAttributes()
Returns all attributes associated with this object.protected ActivityRecord
getDelegateActivityRecord()
Returns the underlying ActivityRecord wrapped by this DelegatingActivityRecord.Date
getEndDate()
Returns the date and time the activity ended, if applicable.String
getIdentifier()
Returns the unique identifier assigned to this record, if any.Map<String,ActivityLog>
getLogs()
Returns a Map of logs related to this record and accessible by the current user, such as Guacamole session recordings.String
getRemoteHost()
Returns the hostname or IP address of the remote host that performed the activity associated with this record, if known.Date
getStartDate()
Returns the date and time the activity began.String
getUsername()
Returns the name of the user who performed or is performing the activity at the times given by this record.UUID
getUUID()
Returns a UUID that uniquely identifies this record.boolean
isActive()
Returns whether the activity associated with this record is still ongoing.
-
-
-
Constructor Detail
-
DelegatingActivityRecord
public DelegatingActivityRecord(ActivityRecord record)
Wraps the given ActivityRecord such that all function calls against this DelegatingActivityRecord will be delegated to it.- Parameters:
record
- The record to wrap.
-
-
Method Detail
-
getDelegateActivityRecord
protected ActivityRecord getDelegateActivityRecord()
Returns the underlying ActivityRecord wrapped by this DelegatingActivityRecord.- Returns:
- The ActivityRecord wrapped by this DelegatingActivityRecord.
-
getStartDate
public Date getStartDate()
Description copied from interface:ActivityRecord
Returns the date and time the activity began.- Specified by:
getStartDate
in interfaceActivityRecord
- Returns:
- The date and time the activity began.
-
getEndDate
public Date getEndDate()
Description copied from interface:ActivityRecord
Returns the date and time the activity ended, if applicable.- Specified by:
getEndDate
in interfaceActivityRecord
- Returns:
- The date and time the activity ended, or null if the activity is still ongoing or if the end time is unknown.
-
getRemoteHost
public String getRemoteHost()
Description copied from interface:ActivityRecord
Returns the hostname or IP address of the remote host that performed the activity associated with this record, if known. If the hostname or IP address is not known, null is returned.- Specified by:
getRemoteHost
in interfaceActivityRecord
- Returns:
- The hostname or IP address of the remote host, or null if this information is not available.
-
getUsername
public String getUsername()
Description copied from interface:ActivityRecord
Returns the name of the user who performed or is performing the activity at the times given by this record.- Specified by:
getUsername
in interfaceActivityRecord
- Returns:
- The name of the user who performed or is performing the associated activity.
-
isActive
public boolean isActive()
Description copied from interface:ActivityRecord
Returns whether the activity associated with this record is still ongoing.- Specified by:
isActive
in interfaceActivityRecord
- Returns:
- true if the activity associated with this record is still ongoing, false otherwise.
-
getIdentifier
public String getIdentifier()
Description copied from interface:ActivityRecord
Returns the unique identifier assigned to this record, if any. If this record is not uniquely identifiable, this may be null. If provided, this unique identifier MUST be unique across allActivityRecord
objects within the sameActivityRecordSet
.- Specified by:
getIdentifier
in interfaceActivityRecord
- Returns:
- The unique identifier assigned to this record, or null if this record has no such identifier.
-
getUUID
public UUID getUUID()
Description copied from interface:ActivityRecord
Returns a UUID that uniquely identifies this record. If provided, this UUID MUST be deterministic and unique across allActivityRecord
objects within the sameActivityRecordSet
, and SHOULD be unique across allActivityRecord
objects.- Specified by:
getUUID
in interfaceActivityRecord
- Returns:
- A UUID that uniquely identifies this record, or null if no such unique identifier exists.
-
getLogs
public Map<String,ActivityLog> getLogs()
Description copied from interface:ActivityRecord
Returns a Map of logs related to this record and accessible by the current user, such as Guacamole session recordings. Each log is associated with a corresponding, arbitrary, unique name. If the user does not have access to any logs, or if no logs are available, this may be an empty map.- Specified by:
getLogs
in interfaceActivityRecord
- Returns:
- A Map of logs related to this record.
-
getAttributes
public Map<String,String> getAttributes()
Description copied from interface:ReadableAttributes
Returns all attributes associated with this object. The returned map may not be modifiable.- Specified by:
getAttributes
in interfaceActivityRecord
- Specified by:
getAttributes
in interfaceReadableAttributes
- Returns:
- A map of all attribute identifiers to their corresponding values, for all attributes associated with this object, which may not be modifiable.
-
-