1Net::DBus::ASyncReply(3U)ser Contributed Perl DocumentatiNoent::DBus::ASyncReply(3)
2
3
4

NAME

6       Net::DBus::ASyncReply - asynchronous method reply handler
7

SYNOPSIS

9         use Net::DBus::Annotation qw(:call);
10
11         my $object = $service->get_object("/org/example/systemMonitor");
12
13         # List processes & get on with other work until
14         # the list is returned.
15         my $asyncreply = $object->list_processes(dbus_call_async, "someuser");
16
17         while (!$asyncreply->is_ready) {
18           ... do some background work..
19         }
20
21         my $processes = $asyncreply->get_result;
22

DESCRIPTION

24       This object provides a handler for receiving asynchronous method
25       replies. An asynchronous reply object is generated when making remote
26       method call with the "dbus_call_async" annotation set.
27

METHODS

29       $asyncreply->discard_result;
30           Indicates that the caller is no longer interested in receiving the
31           reply & that it should be discarded. After calling this method,
32           this object should not be used again.
33
34       $asyncreply->wait_for_result;
35           Blocks the caller waiting for completion of the of the asynchronous
36           reply. Upon returning from this method, the result can be obtained
37           with the "get_result" method.
38
39       my $boolean = $asyncreply->is_ready;
40           Returns a true value if the asynchronous reply is now complete (or
41           a timeout has occurred). When this method returns true, the result
42           can be obtained with the "get_result" method.
43
44       $asyncreply->set_notify($coderef);
45           Sets a notify function which will be invoked when the asynchronous
46           reply finally completes. The callback will be invoked with a single
47           parameter which is this object.
48
49       my @data = $asyncreply->get_result;
50           Retrieves the data associated with the asynchronous reply.  If a
51           timeout occurred, then this method will throw an exception. This
52           method can only be called once the reply is complete, as indicated
53           by the "is_ready" method returning a true value. After calling this
54           method, this object should no longer be used.
55

AUTHOR

57       Daniel Berrange <dan@berrange.com>
58
60       Copright (C) 2006-2011, Daniel Berrange.
61

SEE ALSO

63       Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation
64
65
66
67perl v5.32.0                      2020-07-28          Net::DBus::ASyncReply(3)
Impressum