GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::DBus::ASyncReply(3) User Contributed Perl Documentation Net::DBus::ASyncReply(3)

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

  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;

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

$asyncreply->discard_result;
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.
$asyncreply->wait_for_result;
Blocks the caller waiting for completion of the of the asynchronous reply. Upon returning from this method, the result can be obtained with the "get_result" method.
my $boolean = $asyncreply->is_ready;
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 "get_result" method.
$asyncreply->set_notify($coderef);
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.
my @data = $asyncreply->get_result;
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 "is_ready" method returning a true value. After calling this method, this object should no longer be used.

Daniel Berrange <dan@berrange.com>

Copright (C) 2006-2011, Daniel Berrange.

Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation
2019-02-12 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.