Interface Retrievable
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
Item,Retrievable.Retrievable$Impl
SecretRetrievable provides a read-only view of a secret item
stored in the Secret Service.
Each item has a value, represented by a Value, which can be
retrieved by retrieveSecret(org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) and
retrieveSecretFinish(org.gnome.gio.AsyncResult).
- Since:
- 0.19.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRetrievable.Builder<B extends Builder<B>>static classThe Retrievable$Impl type represents a native instance of the Retrievable interface.static classThe interface forSecretRetrievable. -
Method Summary
Modifier and TypeMethodDescriptionGet the attributes of this object.default longGet the created date and time of the object.default StringgetLabel()Get the label of this item.default longGet the modified date and time of the object.static @Nullable TypegetType()Get the GType of the Retrievable classdefault voidretrieveSecret(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Retrieve the secret value of this object.default @Nullable ValueretrieveSecretFinish(AsyncResult result) Complete asynchronous operation to retrieve the secret value of this object.default @Nullable ValueretrieveSecretSync(@Nullable Cancellable cancellable) Retrieve the secret value of this object synchronously.
-
Method Details
-
getType
-
getAttributes
Get the attributes of this object.The attributes are a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.
Do not modify the attribute returned by this method.
- Returns:
- a new reference
to the attributes, which should not be modified, and
released with
HashTable.unref() - Since:
- 0.19.0
-
getCreated
default long getCreated()Get the created date and time of the object.The return value is the number of seconds since the unix epoch, January 1st 1970.
- Returns:
- the created date and time
- Since:
- 0.19.0
-
getLabel
Get the label of this item.- Returns:
- the label, which should be freed with
GLib.free(java.lang.foreign.MemorySegment) - Since:
- 0.19.0
-
getModified
default long getModified()Get the modified date and time of the object.The return value is the number of seconds since the unix epoch, January 1st 1970.
- Returns:
- the modified date and time
- Since:
- 0.19.0
-
retrieveSecret
default void retrieveSecret(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Retrieve the secret value of this object.Each retrievable object has a single secret which might be a password or some other secret binary value.
This function returns immediately and completes asynchronously.
- Parameters:
cancellable- optional cancellation objectcallback- called when the operation completes- Since:
- 0.19.0
-
retrieveSecretFinish
Complete asynchronous operation to retrieve the secret value of this object.- Parameters:
result- asynchronous result passed to callback- Returns:
- the secret value which should be
released with
Value.unref(), ornull - Throws:
GErrorException- seeGError- Since:
- 0.19.0
-
retrieveSecretSync
default @Nullable Value retrieveSecretSync(@Nullable Cancellable cancellable) throws GErrorException Retrieve the secret value of this object synchronously.Each retrievable object has a single secret which might be a password or some other secret binary value.
This method may block indefinitely and should not be used in user interface threads.
- Parameters:
cancellable- optional cancellation object- Returns:
- the secret value which should be
released with
Value.unref(), ornull - Throws:
GErrorException- seeGError- Since:
- 0.19.0
-