public class Interface
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
VIR_INTERFACE_XML_INACTIVE
Get XML Flag: dump inactive interface information
|
Modifier and Type | Method and Description |
---|---|
int |
create()
Activate an interface (i.e.
|
int |
destroy()
Deactivate an interface (i.e.
|
protected void |
finalize() |
int |
free()
Frees this interface object.
|
java.lang.String |
getMACString()
Returns the mac string of the interface
|
java.lang.String |
getName()
Returns the name of the interface
|
java.lang.String |
getXMLDescription(int flags)
Returns the XML description for theinterface
|
int |
isActive()
Determine if the interface is currently running
|
int |
undefine()
Undefine an interface, ie remove it from the config.
|
public static final int VIR_INTERFACE_XML_INACTIVE
public int create() throws LibvirtException
If there was an open network config transaction at the time this interface was defined (that is, if virInterfaceChangeBegin() had been called), the interface will be brought back down (and then undefined) if virInterfaceChangeRollback() is called.
LibvirtException
public int destroy() throws LibvirtException
This does not remove the interface from the config, and does not free the associated virInterfacePtr object.
If there is an open network config transaction at the time this interface is destroyed (that is, if virInterfaceChangeBegin() had been called), and if the interface is later undefined and then virInterfaceChangeRollback() is called, the restoral of the interface definition will also bring the interface back up.
LibvirtException
protected void finalize() throws LibvirtException
finalize
in class java.lang.Object
LibvirtException
public int free() throws LibvirtException
LibvirtException
public java.lang.String getMACString() throws LibvirtException
LibvirtException
public java.lang.String getName() throws LibvirtException
LibvirtException
public java.lang.String getXMLDescription(int flags) throws LibvirtException
flags
- LibvirtException
public int isActive() throws LibvirtException
LibvirtException
public int undefine() throws LibvirtException
LibvirtException