Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::dbus::asyncreply(3pm) [debian man page]

Net::DBus::ASyncReply(3pm)				User Contributed Perl Documentation				Net::DBus::ASyncReply(3pm)

NAME
Net::DBus::ASyncReply - asynchronous method reply handler SYNOPSIS
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; DESCRIPTION
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. METHODS
$asyncreply->discard_result; Indicates that the caller is no longer interested in recieving 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. AUTHOR
Daniel Berrange <dan@berrange.com> COPYRIGHT
Copright (C) 2006-2011, Daniel Berrange. SEE ALSO
Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation perl v5.14.2 2011-06-30 Net::DBus::ASyncReply(3pm)

Check Out this Related Man Page

Net::DBus::Binding::PendingCall(3pm)			User Contributed Perl Documentation		      Net::DBus::Binding::PendingCall(3pm)

NAME
Net::DBus::Binding::PendingCall - A handler for pending method replies SYNOPSIS
my $call = Net::DBus::Binding::PendingCall->new(method_call => $call, pending_call => $reply); # Wait for completion $call->block; # And get the reply message my $msg = $call->get_reply; DESCRIPTION
This object is used when it is necessary to make asynchronous method calls. It provides the means to be notified when the reply is finally received. METHODS
my $call = Net::DBus::Binding::PendingCall->new(method_call => $method_call, pending_call => $pending_call); Creates a new pending call object, with the "method_call" parameter being a reference to the "Net::DBus::Binding::Message::MethodCall" object whose reply is being waiting for. The "pending_call" parameter is a reference to the raw C pending call object. $call->cancel Cancel the pending call, causing any reply that is later received to be discarded. my $boolean = $call->get_completed Returns a true value if the pending call has received its reply, or a timeout has occurred. $call->block Block the caller until the reply is received or a timeout occurrs. my $msg = $call->get_reply; Retrieves the "Net::DBus::Binding::Message" object associated with the complete call. $call->set_notify($coderef); Sets a notification function to be invoked when the pending call completes. The callback will be passed a single argument which is this pending call object. AUTHOR
Daniel P. Berrange COPYRIGHT
Copyright (C) 2006-2011 Daniel P. Berrange SEE ALSO
Net::DBus::Binding::Connection, Net::DBus::Binding::Message, Net::DBus::ASyncReply perl v5.14.2 2011-06-30 Net::DBus::Binding::PendingCall(3pm)
Man Page