org.libvirt
public class Network extends Object
| Field Summary | |
|---|---|
| protected Libvirt | libvirt
The libvirt connection from the hypervisor |
| protected Connect | virConnect
The Connect Object that represents the Hypervisor of this Network |
| Method Summary | |
|---|---|
| void | create()
Creates and starts this defined network. |
| void | destroy()
Destroy this network object. |
| int | free()
Frees this network object. |
| boolean | getAutostart()
Provides a boolean value indicating whether this network is configured to
be automatically started when the host machine boots.
|
| String | getBridgeName()
Provides a bridge interface name to which a domain may connect a network
interface in order to join this network.
|
| Connect | getConnect()
Provides the connection pointer associated with this network.
|
| String | getName()
Gets the public name for this network
|
| int[] | getUUID()
Gets the UUID for this network
|
| String | getUUIDString()
Gets the UUID for a network as string.
|
| String | getXMLDesc(int flags)
Provides an XML description of this network. |
| int | isActive()
Determine if the network is currently running
|
| int | isPersistent()
Determine if the network has a persistent configuration which means it
will still exist after shutting down
|
| protected void | processError() |
| void | setAutostart(boolean autostart)
Configures this network to be automatically started when the host machine
boots.
|
| void | undefine()
Undefines this network but does not stop it if it is running
|
Throws: LibvirtException
Throws: LibvirtException
Returns: number of references left (>= 0) for success, -1 for failure.
Throws: LibvirtException
Returns: true if autostarted, false otherwise
Throws: LibvirtException
Returns: the interface name
Throws: LibvirtException
Returns: the Connect object
Returns: the public name
Throws: LibvirtException
Returns: the UUID as an unpacked int array
Throws: LibvirtException
See Also: rfc4122
Returns: the UUID in canonical String format
Throws: LibvirtException
See Also: rfc4122
Parameters: flags and OR'ed set of extraction flags, not used yet
Returns: The XML representation of this network
Throws: LibvirtException
Returns: 1 if running, 0 if inactive, -1 on error
Throws: LibvirtException
See Also: Libvirt
Documentation
Returns: 1 if persistent, 0 if transient, -1 on error
Throws: LibvirtException
See Also: Libvirt
Documentation
Parameters: autostart whether the network should be automatically started 0 or 1
Throws: LibvirtException
Throws: LibvirtException