141 lines
3.3 KiB
HTML
141 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Net::DBus::ASyncReply</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Net::DBus::ASyncReply</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2019-12-26<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Net::DBus::ASyncReply - asynchronous method reply handler
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use Net::DBus::Annotation qw(:call);
|
|
|
|
my $object = $service->get_object("/org/example/systemMonitor");
|
|
|
|
# List processes & get on with other work until
|
|
# the list is returned.
|
|
my $asyncreply = $object->list_processes(dbus_call_async, "someuser");
|
|
|
|
while (!$asyncreply->is_ready) {
|
|
... do some background work..
|
|
}
|
|
|
|
my $processes = $asyncreply->get_result;
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This object provides a handler for receiving asynchronous
|
|
method replies. An asynchronous reply object is generated
|
|
when making remote method call with the <TT>"dbus_call_async"</TT>
|
|
annotation set.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">$asyncreply->discard_result;<DD>
|
|
|
|
|
|
|
|
|
|
Indicates that the caller is no longer interested in
|
|
receiving the reply & that it should be discarded. After
|
|
calling this method, this object should not be used again.
|
|
<DT id="2">$asyncreply->wait_for_result;<DD>
|
|
|
|
|
|
|
|
|
|
Blocks the caller waiting for completion of the of the
|
|
asynchronous reply. Upon returning from this method, the
|
|
result can be obtained with the <TT>"get_result"</TT> method.
|
|
<DT id="3">my $boolean = $asyncreply->is_ready;<DD>
|
|
|
|
|
|
|
|
|
|
Returns a true value if the asynchronous reply is now
|
|
complete (or a timeout has occurred). When this method
|
|
returns true, the result can be obtained with the <TT>"get_result"</TT>
|
|
method.
|
|
<DT id="4">$asyncreply->set_notify($coderef);<DD>
|
|
|
|
|
|
|
|
|
|
Sets a notify function which will be invoked when the
|
|
asynchronous reply finally completes. The callback will
|
|
be invoked with a single parameter which is this object.
|
|
<DT id="5">my @data = $asyncreply->get_result;<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the data associated with the asynchronous reply.
|
|
If a timeout occurred, then this method will throw an
|
|
exception. This method can only be called once the reply
|
|
is complete, as indicated by the <TT>"is_ready"</TT> method
|
|
returning a true value. After calling this method, this
|
|
object should no longer be used.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Daniel Berrange <<A HREF="mailto:dan@berrange.com">dan@berrange.com</A>>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copright (C) 2006-2011, Daniel Berrange.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">METHODS</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">AUTHOR</A><DD>
|
|
<DT id="11"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="12"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:48 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|