Package org.libvirt
Class Connect
java.lang.Object
org.libvirt.Connect
The Connect object represents a connection to a local or remote
hypervisor/driver.
- Author:
- stoty
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a read-write Connect object from the supplied URI.Constructs a Connect object from the supplied URI.Connect
(String uri, ConnectAuth auth, int flags) Constructs a Connect object from the supplied URI, using the supplied authentication callback -
Method Summary
Modifier and TypeMethodDescriptionbaselineCPU
(String[] xmlCPUs) Computes the most feature-rich CPU which is compatible with all given host CPUs.int
close()
Closes the connection to the hypervisor/driver.compareCPU
(String xmlDesc) Compares the given CPU description with the host CPUstatic Connect
connectionForDomain
(Domain domain) Creates a new connection object from the domain.static Connect
connectionForNetwork
(Network network) Creates a new connection object from the network.static Connect
connectionForSecret
(Secret secret) Creates a new connection object from the network.static long
connectionVersion
(Connect conn) Get the version of a connection.static int[]
convertUUIDBytes
(byte[] bytes) Helper function to convert bytes into ints for the UUID callsstatic byte[]
createUUIDBytes
(int[] UUID) Helper function to convert UUIDs into a stirng for the UUID callsdeviceCreateXML
(String xmlDesc) Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.deviceLookupByName
(String name) Fetch a device based on its unique namedomainCreateLinux
(String xmlDesc, int flags) Launches a new Linux guest domain.domainCreateXML
(String xmlDesc, int flags) Launch a new guest domain, based on an XML descriptiondomainDefineXML
(String xmlDesc) Defines a domain, but does not start itint
domainEventDeregisterAny
(int callbackID) Removes an event callback.int
domainEventRegisterAny
(Domain domain, int eventId, Libvirt.VirConnectDomainEventGenericCallback cb) Adds a callback to receive notifications of arbitrary domain events occurring on a domain.domainLookupByID
(int id) Finds a domain based on the hypervisor ID number.domainLookupByName
(String name) Looks up a domain based on its name.domainLookupByUUID
(int[] UUID) Looks up a domain based on its UUID in array form.domainLookupByUUID
(UUID uuid) Fetch a domain based on its globally unique idLooks up a domain based on its UUID in String form.domainXMLFromNative
(String nativeFormat, String nativeConfig, int flags) Reads a native XML configuration document, and generates generates a domain configuration file describing the domain.domainXMLToNative
(String nativeFormat, String domainXML, int flags) Reads a domain XML configuration document, and generates generates a native configuration file describing the domain.void
finalize()
findStoragePoolSources
(String type, String srcSpecs, int flags) Talks to a storage backend and attempts to auto-discover the set of available storage pool sources.Provides capabilities of the hypervisor / driver.long
getCellsFreeMemory
(int startCells, int maxCells) NUMA Supportlong
Returns the free memory for the connectionReturns the system hostname on which the hypervisor is running.long
getHypervisorVersion
(String type) Returns the version of the hypervisor against which the library was compiled.long
Gets the version of the native libvirt library that the JNI part is linked to.int
getMaxVcpus
(String type) Provides the maximum number of virtual CPUs supported for a guest VM of a specific type.getType()
Gets the name of the Hypervisor software used.getURI()
Returns the URI (name) of the hypervisor connection.long
Gets the version level of the Hypervisor running.interfaceDefineXML
(String xmlDesc) Define an interface (or modify existing interface configuration)Try to lookup an interface on the given hypervisor based on its MAC.interfaceLookupByName
(String name) Try to lookup an interface on the given hypervisor based on its name.boolean
Verify the connect is active.int
Determine if the connection is encryptedint
isSecure()
Determine if the connection is secureString[]
Lists the names of the defined but inactive domainsString[]
Provides the list of names of defined interfaces on this hostString[]
Lists the inactive networksString[]
Provides the list of names of inactive storage pools.String[]
listDevices
(String capabilityName) List the names of the devices on this nodeint[]
Lists the active domains.String[]
Provides the list of names of interfaces on this hostString[]
Lists the names of the network filtersString[]
Lists the active networks.String[]
Retrieve the List UUIDs of defined secretsString[]
Provides the list of names of active storage pools.networkCreateXML
(String xmlDesc) Creates and starts a new virtual network.networkDefineXML
(String xmlDesc) Defines a network, but does not create it.networkFilterDefineXML
(String xmlDesc) Defines a networkFilterFetch a network filter based on its unique namenetworkFilterLookupByUUID
(int[] UUID) Looks up a network filter based on its UUID in array form.Fetch a network filter based on its globally unique idLooks up a network filter based on its UUID in String form.networkLookupByName
(String name) Looks up a network on the based on its name.networkLookupByUUID
(int[] UUID) Deprecated.use the UUIDString or UUID API.networkLookupByUUID
(UUID uuid) Fetch a network based on its globally unique idLooks up a network based on its UUID represented as a String.nodeInfo()
Returns a NodeInfo object describing the hardware configuration of the node.int
Provides the number of inactive domains.int
Provides the number of defined interfaces.int
Provides the number of inactive networks.int
Provides the number of inactive storage poolsint
numOfDevices
(String capabilityName) Provides the number of node devices.int
Provides the number of active domains.int
Provides the number of interfaces.int
Provides the number of network filtersint
Provides the number of active networks.int
Fetch number of currently defined secrets.int
Provides the number of active storage poolsprotected void
call the error handling logic.void
Restores a domain saved to disk by Domain.save().secretDefineXML
(String xmlDesc) If XML specifies a UUID, locates the specified secret and replaces all attributes of the secret specified by UUID by attributes specified in xml (any attributes not specified in xml are discarded).secretLookupByUUID
(int[] UUID) Looks up a secret based on its UUID in array form.secretLookupByUUID
(UUID uuid) Fetch a secret based on its globally unique idLooks up a secret based on its UUID in String form.void
void
setDom0Memory
(long memory) change the amount of memory reserved to Domain0.static void
setErrorCallback
(Libvirt.VirErrorCallback callback) Sets the error function to a user defined callbackstoragePoolCreateXML
(String xmlDesc, int flags) Create a new storage based on its XML description.storagePoolDefineXML
(String xml, int flags) Define a new inactive storage pool based on its XML description.Fetch a storage pool based on its unique namestoragePoolLookupByUUID
(int[] UUID) Deprecated.Use the UUIDString or UUID APIs.storagePoolLookupByUUID
(UUID uuid) Fetch a storage pool based on its globally unique idFetch a storage pool based on its globally unique idFetch a a storage volume based on its globally unique keystorageVolLookupByPath
(String path) Fetch a storage volume based on its locally (host) unique pathstreamNew
(int flags) Creates a new stream object which can be used to perform streamed I/O with other public API function.
-
Field Details
-
VCP
The native virConnectPtr.
-
-
Constructor Details
-
Connect
Constructs a read-write Connect object from the supplied URI.- Parameters:
uri
- The connection URI- Throws:
LibvirtException
- See Also:
-
Connect
Constructs a Connect object from the supplied URI.- Parameters:
uri
- The connection URIreadOnly
- Whether the connection is read-only- Throws:
LibvirtException
- See Also:
-
Connect
Constructs a Connect object from the supplied URI, using the supplied authentication callback- Parameters:
uri
- The connection URIauth
- a ConnectAuth objectflags
-- Throws:
LibvirtException
- See Also:
-
-
Method Details
-
connectionForDomain
Creates a new connection object from the domain. If all you want is the existing domain's connection, use the getConnection method directly. Thie method returns a new connection.- Parameters:
domain
-- Returns:
- a new connection
-
connectionForNetwork
Creates a new connection object from the network. If all you want is the existing network's connection, use the getConnection method directly. Thie method returns a new connection.- Parameters:
network
-- Returns:
- a new connection
-
connectionForSecret
Creates a new connection object from the network. If all you want is the existing network's connection, use the getConnection method directly. Thie method returns a new connection.- Parameters:
secret
-- Returns:
- a new connection
-
connectionVersion
Get the version of a connection.- Parameters:
conn
- the connection to use.- Returns:
- -1 in case of failure, versions have the format major * 1,000,000 + minor * 1,000 + release.
- See Also:
-
convertUUIDBytes
public static int[] convertUUIDBytes(byte[] bytes) Helper function to convert bytes into ints for the UUID calls -
createUUIDBytes
public static byte[] createUUIDBytes(int[] UUID) Helper function to convert UUIDs into a stirng for the UUID calls -
setErrorCallback
Sets the error function to a user defined callback- Parameters:
callback
- a Class to perform the callback- Throws:
LibvirtException
-
baselineCPU
Computes the most feature-rich CPU which is compatible with all given host CPUs.- Parameters:
xmlCPUs
- array of XML descriptions of host CPUs- Returns:
- XML description of the computed CPU or NULL on error.
- Throws:
LibvirtException
-
close
Closes the connection to the hypervisor/driver. Calling any methods on the object after close() will result in an exception.- Returns:
- number of references left (>= 0) for success, -1 for failure.
- Throws:
LibvirtException
-
compareCPU
Compares the given CPU description with the host CPU- Parameters:
xmlDesc
-- Returns:
- comparison result according to enum CPUCompareResult
- Throws:
LibvirtException
- See Also:
-
deviceCreateXML
Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.- Parameters:
xmlDesc
- the device to create- Returns:
- the Device object
- Throws:
LibvirtException
-
deviceLookupByName
Fetch a device based on its unique name- Parameters:
name
- name of device to fetch- Returns:
- Device object
- Throws:
LibvirtException
-
domainCreateLinux
Launches a new Linux guest domain. The domain is based on an XML description similar to the one returned by virDomainGetXMLDesc(). This function may require priviledged access to the hypervisor.- Parameters:
xmlDesc
- the Domain description in XMLflags
- an optional set of flags (unused)- Returns:
- the Domain object
- Throws:
LibvirtException
- See Also:
-
domainCreateXML
Launch a new guest domain, based on an XML description- Parameters:
xmlDesc
-- Returns:
- the Domain object
- Throws:
LibvirtException
- See Also:
-
domainDefineXML
Defines a domain, but does not start it- Parameters:
xmlDesc
-- Returns:
- the Domain object
- Throws:
LibvirtException
- See Also:
-
domainEventDeregisterAny
Removes an event callback.- Parameters:
callbackID
- the callback to deregister- Returns:
- 0 on success, -1 on failure
- Throws:
LibvirtException
- See Also:
-
domainEventRegisterAny
public int domainEventRegisterAny(Domain domain, int eventId, Libvirt.VirConnectDomainEventGenericCallback cb) throws LibvirtException Adds a callback to receive notifications of arbitrary domain events occurring on a domain.- Parameters:
domain
- option domain to limit the events monitoredeventId
- the events to monitorcb
- the callback function to use.- Returns:
- . The return value from this method is a positive integer identifier for the callback. -1 if an error
- Throws:
LibvirtException
- See Also:
-
domainLookupByID
Finds a domain based on the hypervisor ID number.- Parameters:
id
- the hypervisor id- Returns:
- the Domain object
- Throws:
LibvirtException
-
domainLookupByName
Looks up a domain based on its name.- Parameters:
name
- the name of the domain- Returns:
- the Domain object
- Throws:
LibvirtException
-
domainLookupByUUID
Looks up a domain based on its UUID in array form. The UUID Array contains an unpacked representation of the UUID, each int contains only one byte.- Parameters:
UUID
- the UUID as an unpacked int array- Returns:
- the Domain object
- Throws:
LibvirtException
-
domainLookupByUUID
Fetch a domain based on its globally unique id- Parameters:
uuid
- a java UUID- Returns:
- a new domain object
- Throws:
LibvirtException
-
domainLookupByUUIDString
Looks up a domain based on its UUID in String form.- Parameters:
UUID
- the UUID in canonical String representation- Returns:
- the Domain object
- Throws:
LibvirtException
-
domainXMLFromNative
public String domainXMLFromNative(String nativeFormat, String nativeConfig, int flags) throws LibvirtException Reads a native XML configuration document, and generates generates a domain configuration file describing the domain. The format of the native data is hypervisor dependant.- Returns:
- domain XML as String, or
null
on error - Throws:
LibvirtException
-
domainXMLToNative
public String domainXMLToNative(String nativeFormat, String domainXML, int flags) throws LibvirtException Reads a domain XML configuration document, and generates generates a native configuration file describing the domain. The format of the native data is hypervisor dependant.- Returns:
- domain XML as String, or
null
on error - Throws:
LibvirtException
-
finalize
- Overrides:
finalize
in classObject
- Throws:
LibvirtException
-
findStoragePoolSources
public String findStoragePoolSources(String type, String srcSpecs, int flags) throws LibvirtException Talks to a storage backend and attempts to auto-discover the set of available storage pool sources. e.g. For iSCSI this would be a set of iSCSI targets. For NFS this would be a list of exported paths. The srcSpec (optional for some storage pool types, e.g. local ones) is an instance of the storage pool's source element specifying where to look for the pools. srcSpec is not required for some types (e.g., those querying local storage resources only)- Parameters:
type
- type of storage pool to discoversrcSpecs
- XML document specifying discovery sourcflags
- unused- Returns:
- an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.
- Throws:
LibvirtException
-
getCapabilities
Provides capabilities of the hypervisor / driver.- Returns:
- an XML String describing the capabilities.
- Throws:
LibvirtException
- See Also:
-
getCellsFreeMemory
NUMA Support- Throws:
LibvirtException
-
getFreeMemory
Returns the free memory for the connection- Throws:
LibvirtException
-
getHostName
Returns the system hostname on which the hypervisor is running. (the result of the gethostname(2) system call) If we are connected to a remote system, then this returns the hostname of the remote system.- Returns:
- the hostname
- Throws:
LibvirtException
-
getHypervisorVersion
Returns the version of the hypervisor against which the library was compiled. The type parameter specified which hypervisor's version is returned- Parameters:
type
-- Returns:
- major * 1,000,000 + minor * 1,000 + release
- Throws:
LibvirtException
-
getLibVirVersion
Gets the version of the native libvirt library that the JNI part is linked to.- Returns:
- major * 1,000,000 + minor * 1,000 + release
- Throws:
LibvirtException
-
getMaxVcpus
Provides the maximum number of virtual CPUs supported for a guest VM of a specific type. The 'type' parameter here corresponds to the 'type' attribute in theelement of the XML. - Parameters:
type
-- Returns:
- the number of CPUs
- Throws:
LibvirtException
-
getType
Gets the name of the Hypervisor software used.- Returns:
- the name
- Throws:
LibvirtException
-
getURI
Returns the URI (name) of the hypervisor connection. Normally this is the same as or similar to the string passed to the virConnectOpen/virConnectOpenReadOnly call, but the driver may make the URI canonical.- Returns:
- the URI
- Throws:
LibvirtException
-
getVersion
Gets the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection. If the version can't be extracted by lack of capacities returns 0.- Returns:
- major * 1,000,000 + minor * 1,000 + release
- Throws:
LibvirtException
-
interfaceDefineXML
Define an interface (or modify existing interface configuration)- Parameters:
xmlDesc
- the interface to create- Returns:
- the Interface object
- Throws:
LibvirtException
-
interfaceLookupByMACString
Try to lookup an interface on the given hypervisor based on its MAC.- Throws:
LibvirtException
-
interfaceLookupByName
Try to lookup an interface on the given hypervisor based on its name.- Throws:
LibvirtException
-
isEncrypted
Determine if the connection is encrypted- Returns:
- 1 if encrypted, 0 if not encrypted, -1 on error
- Throws:
LibvirtException
- See Also:
-
isSecure
Determine if the connection is secure- Returns:
- 1 if secure, 0 if not secure, -1 on error
- Throws:
LibvirtException
- See Also:
-
listDefinedDomains
Lists the names of the defined but inactive domains- Returns:
- an Array of Strings that contains the names of the defined domains currently inactive
- Throws:
LibvirtException
-
listDefinedInterfaces
Provides the list of names of defined interfaces on this host- Returns:
- an Array of Strings that contains the names of the interfaces on this host
- Throws:
LibvirtException
-
listDefinedNetworks
Lists the inactive networks- Returns:
- an Array of Strings that contains the names of the inactive networks
- Throws:
LibvirtException
-
listDefinedStoragePools
Provides the list of names of inactive storage pools.- Returns:
- an Array of Strings that contains the names of the defined storage pools
- Throws:
LibvirtException
-
listDevices
List the names of the devices on this node- Parameters:
capabilityName
- optional capability name- Throws:
LibvirtException
-
listDomains
Lists the active domains.- Returns:
- and array of the IDs of the active domains
- Throws:
LibvirtException
-
listInterfaces
Provides the list of names of interfaces on this host- Returns:
- an Array of Strings that contains the names of the interfaces on this host
- Throws:
LibvirtException
-
listNetworkFilters
Lists the names of the network filters- Returns:
- an Array of Strings that contains the names network filters
- Throws:
LibvirtException
-
listNetworks
Lists the active networks.- Returns:
- an Array of Strings that contains the names of the active networks
- Throws:
LibvirtException
-
listSecrets
Retrieve the List UUIDs of defined secrets- Returns:
- an Array of Strings that contains the uuids of the defined secrets
- Throws:
LibvirtException
-
listStoragePools
Provides the list of names of active storage pools.- Returns:
- an Array of Strings that contains the names of the defined storage pools
- Throws:
LibvirtException
-
networkCreateXML
Creates and starts a new virtual network. The properties of the network are based on an XML description similar to the one returned by virNetworkGetXMLDesc()- Parameters:
xmlDesc
- the Network Description- Returns:
- the Network object representing the created network
- Throws:
LibvirtException
- See Also:
-
networkDefineXML
Defines a network, but does not create it. The properties of the network are based on an XML description similar to the one returned by virNetworkGetXMLDesc()- Parameters:
xmlDesc
-- Returns:
- the resulting Network object
- Throws:
LibvirtException
- See Also:
-
networkFilterDefineXML
Defines a networkFilter- Parameters:
xmlDesc
- the descirption of the filter- Returns:
- the new filer
- Throws:
LibvirtException
- See Also:
-
networkFilterLookupByName
Fetch a network filter based on its unique name- Parameters:
name
- name of network filter to fetch- Returns:
- network filter object
- Throws:
LibvirtException
- See Also:
-
networkFilterLookupByUUID
Looks up a network filter based on its UUID in array form. The UUID Array contains an unpacked representation of the UUID, each int contains only one byte.- Parameters:
UUID
- the UUID as an unpacked int array- Returns:
- the network filter object
- Throws:
LibvirtException
-
networkFilterLookupByUUID
Fetch a network filter based on its globally unique id- Parameters:
uuid
- a java UUID- Returns:
- a new network filter object
- Throws:
LibvirtException
-
networkFilterLookupByUUIDString
Looks up a network filter based on its UUID in String form.- Parameters:
UUID
- the UUID in canonical String representation- Returns:
- the Network Filter object
- Throws:
LibvirtException
-
networkLookupByName
Looks up a network on the based on its name.- Parameters:
name
- name of the network- Returns:
- The Network object found
- Throws:
LibvirtException
-
networkLookupByUUID
Deprecated.use the UUIDString or UUID API.Looks up a network based on its UUID represented as an int array. The UUID Array contains an unpacked representation of the UUID, each int contains only one byte.- Parameters:
UUID
- the UUID as an unpacked int array- Returns:
- The Network object found
- Throws:
LibvirtException
-
networkLookupByUUID
Fetch a network based on its globally unique id- Parameters:
uuid
- a java UUID- Returns:
- a new network object
- Throws:
LibvirtException
-
networkLookupByUUIDString
Looks up a network based on its UUID represented as a String.- Parameters:
UUID
- the UUID in canonical String representation- Returns:
- The Network object found
- Throws:
LibvirtException
-
nodeInfo
Returns a NodeInfo object describing the hardware configuration of the node.- Returns:
- a NodeInfo object
- Throws:
LibvirtException
-
numOfDefinedDomains
Provides the number of inactive domains.- Returns:
- the number of inactive domains
- Throws:
LibvirtException
-
numOfDefinedInterfaces
Provides the number of defined interfaces.- Returns:
- the number of interfaces
- Throws:
LibvirtException
-
numOfDefinedNetworks
Provides the number of inactive networks.- Returns:
- the number of inactive networks
- Throws:
LibvirtException
-
numOfDefinedStoragePools
Provides the number of inactive storage pools- Returns:
- the number of pools found
- Throws:
LibvirtException
-
numOfDevices
Provides the number of node devices.- Returns:
- the number of inactive domains
- Throws:
LibvirtException
-
numOfDomains
Provides the number of active domains.- Returns:
- the number of active domains
- Throws:
LibvirtException
-
numOfInterfaces
Provides the number of interfaces.- Returns:
- the number of interfaces
- Throws:
LibvirtException
-
numOfNetworkFilters
Provides the number of network filters- Returns:
- the number of network filters
- Throws:
LibvirtException
-
numOfNetworks
Provides the number of active networks.- Returns:
- the number of active networks
- Throws:
LibvirtException
-
numOfSecrets
Fetch number of currently defined secrets.- Returns:
- the number of secrets
- Throws:
LibvirtException
-
numOfStoragePools
Provides the number of active storage pools- Returns:
- the number of pools found
- Throws:
LibvirtException
-
processError
call the error handling logic. Should be called after every libvirt call- Throws:
LibvirtException
-
restore
Restores a domain saved to disk by Domain.save().- Parameters:
from
- the path of the saved file on the remote host- Throws:
LibvirtException
-
secretDefineXML
If XML specifies a UUID, locates the specified secret and replaces all attributes of the secret specified by UUID by attributes specified in xml (any attributes not specified in xml are discarded). Otherwise, creates a new secret with an automatically chosen UUID, and initializes its attributes from xml.- Parameters:
xmlDesc
- the secret to create- Returns:
- the Secret object
- Throws:
LibvirtException
-
secretLookupByUUID
Looks up a secret based on its UUID in array form. The UUID Array contains an unpacked representation of the UUID, each int contains only one byte.- Parameters:
UUID
- the UUID as an unpacked int array- Returns:
- the Secret object
- Throws:
LibvirtException
-
secretLookupByUUID
Fetch a secret based on its globally unique id- Parameters:
uuid
- a java UUID- Returns:
- a new domain object
- Throws:
LibvirtException
-
secretLookupByUUIDString
Looks up a secret based on its UUID in String form.- Parameters:
UUID
- the UUID in canonical String representation- Returns:
- the Domain object
- Throws:
LibvirtException
-
setConnectionErrorCallback
- Throws:
LibvirtException
-
setDom0Memory
change the amount of memory reserved to Domain0. Domain0 is the domain where the application runs. This function may requires priviledged access to the hypervisor.- Parameters:
memory
- in kilobytes- Throws:
LibvirtException
-
storagePoolCreateXML
Create a new storage based on its XML description. The pool is not persistent, so its definition will disappear when it is destroyed, or if the host is restarted- Parameters:
xmlDesc
- XML description for new poolflags
- future flags, use 0 for now- Returns:
- StoragePool object
- Throws:
LibvirtException
-
storagePoolDefineXML
Define a new inactive storage pool based on its XML description. The pool is persistent, until explicitly undefined.- Parameters:
xml
- XML description for new poolflags
- flags future flags, use 0 for now- Returns:
- StoragePool object
- Throws:
LibvirtException
-
storagePoolLookupByName
Fetch a storage pool based on its unique name- Parameters:
name
- name of pool to fetch- Returns:
- StoragePool object
- Throws:
LibvirtException
-
storagePoolLookupByUUID
Deprecated.Use the UUIDString or UUID APIs.Fetch a storage pool based on its globally unique id- Parameters:
UUID
- globally unique id of pool to fetch- Returns:
- a new network object
- Throws:
LibvirtException
-
storagePoolLookupByUUID
Fetch a storage pool based on its globally unique id- Parameters:
uuid
- a java UUID- Returns:
- a new network object
- Throws:
LibvirtException
-
storagePoolLookupByUUIDString
Fetch a storage pool based on its globally unique id- Parameters:
UUID
- globally unique id of pool to fetch- Returns:
- VirStoragePool object
- Throws:
LibvirtException
-
storageVolLookupByKey
Fetch a a storage volume based on its globally unique key- Parameters:
key
- globally unique key- Returns:
- a storage volume
- Throws:
LibvirtException
-
storageVolLookupByPath
Fetch a storage volume based on its locally (host) unique path- Parameters:
path
- locally unique path- Returns:
- a storage volume
- Throws:
LibvirtException
-
streamNew
Creates a new stream object which can be used to perform streamed I/O with other public API function.- Parameters:
flags
- use Stream.VIR_STREAM_NONBLOCK if non-blocking is required- Returns:
- the new object
- Throws:
LibvirtException
-
isConnected
Verify the connect is active.- Returns:
- boolean The true connected, or false not.
- Throws:
LibvirtException
-