Package org.libvirt
Class Secret
java.lang.Object
org.libvirt.Secret
A secret defined by libvirt
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
int
free()
Release the secret handle.byte[]
Fetches the value of the secret as a byte arrayGet the unique identifier of the object with which this secret is to be used.int[]
getUUID()
Get the UUID for this secret.Gets the UUID for this secret as string.getValue()
Fetches the value of the secret as a string (note that this may not always work and getByteValue() is more reliable) This is just kept for backward compatibilityFetches an XML document describing attributes of the secret.int
setValue
(byte[] value) Sets the value of the secretint
Sets the value of the secretint
undefine()
Undefines, but does not free, the Secret.
-
Method Details
-
finalize
- Overrides:
finalize
in classObject
- Throws:
LibvirtException
-
free
Release the secret handle. The underlying secret continues to exist.- Returns:
- ignore (always 0)
- Throws:
LibvirtException
-
getUsageID
Get the unique identifier of the object with which this secret is to be used.- Returns:
- a string identifying the object using the secret, or NULL upon error
- Throws:
LibvirtException
-
getUsageType
- Throws:
LibvirtException
-
getUUID
Get the UUID for this secret.- Returns:
- the UUID as an unpacked int array
- Throws:
LibvirtException
- See Also:
-
getUUIDString
Gets the UUID for this secret as string.- Returns:
- the UUID in canonical String format
- Throws:
LibvirtException
- See Also:
-
getValue
Fetches the value of the secret as a string (note that this may not always work and getByteValue() is more reliable) This is just kept for backward compatibility- Returns:
- the value of the secret, or null on failure.
- Throws:
LibvirtException
-
getByteValue
Fetches the value of the secret as a byte array- Returns:
- the value of the secret, or null on failure.
- Throws:
LibvirtException
-
getXMLDesc
Fetches an XML document describing attributes of the secret.- Returns:
- the XML document
- Throws:
LibvirtException
-
setValue
Sets the value of the secret- Parameters:
value
-- Returns:
- ignore (always 0)
- Throws:
LibvirtException
-
setValue
Sets the value of the secret- Parameters:
value
-- Returns:
- ignore (always 0)
- Throws:
LibvirtException
-
undefine
Undefines, but does not free, the Secret.- Returns:
- ignore (always 0)
- Throws:
LibvirtException
-