org.libvirt
public class Stream extends Object
Field Summary | |
---|---|
protected Libvirt | libvirt
The libvirt connection from the hypervisor |
static int | VIR_STREAM_NONBLOCK |
Method Summary | |
---|---|
int | abort()
Request that the in progress data transfer be cancelled abnormally before
the end of the stream has been reached |
int | addCallback(int events, Libvirt.VirStreamEventCallback cb)
Register a callback to be notified when a stream becomes writable, or
readable.
|
int | finish()
Indicate that there is no further data is to be transmitted on the
stream.
|
int | free()
Decrement the reference count on a stream, releasing the stream object if
the reference count has hit zero.
|
protected void | processError()
Error handling logic to throw errors. |
int | receive(byte[] data)
Receieves data from teh stream into the buffer provided.
|
int | receiveAll(Libvirt.VirStreamSinkFunc handler)
Batch receive method
|
int | removeCallback()
Remove an event callback from the stream
|
int | send(String data)
Write a series of bytes to the stream.
|
int | sendAll(Libvirt.VirStreamSourceFunc handler)
Batch send method
|
int | updateCallback(int events)
Changes the set of events to monitor for a stream.
|
Parameters: events the events to monitor cb the callback method
Returns: 0 for success, -1 for failure
Throws: LibvirtException
See Also: Libvirt
Docs
Returns: 0 if success, -1 if failure
Throws: LibvirtException
Returns: 0 on success, or -1 on error.
Throws: LibvirtException
Parameters: data the put the sata into
Returns: the number of bytes read, -1 on error, -2 if the buffer is empty
Throws: LibvirtException
Parameters: handler the callback handler
Returns: 0 if successfule, -1 otherwise
Throws: LibvirtException
See Also: http://www.libvirt.org/html/libvirt-libvirt.html#virStreamRecvAll
Returns: 0 for success, -1 for failure
Throws: LibvirtException
See Also: Libvirt
Docs
Parameters: data the data to write
Returns: the number of bytes written, -1 on error, -2 if the buffer is full
Throws: LibvirtException
Parameters: handler the callback handler
Returns: 0 if successfule, -1 otherwise
Throws: LibvirtException
See Also: Libvirt
Documentation
Parameters: events the events to monitor
Returns: 0 for success, -1 for failure
Throws: LibvirtException
See Also: Libvirt
Docs