
Tangence::ObjectProxy - proxy for a Tangence object in a Tangence::Client

Instances in this class act as a proxy for an object in the Tangence::Server, allowing methods to be called, events to be subscribed to, and properties to be watched.
These objects are not directly constructed by calling the new class method; instead they are returned by methods on Tangence::Client,
or by methods on other Tangence::ObjectProxy instances.
Ultimately every object proxy that a client uses will come from either the proxy to the registry,
or the root object.

Returns the object ID for the Tangence object being proxied for.
Returns the name of the class of the Tangence object being proxied for.
Calls the given method on the server object and invokes a callback function when a result is received.
Takes the following named arguments:
The name of the method
Optional. If provided, gives positional arguments for the method.
Callback function to invoke when a result is returned
$on_result->( $result )
Optional. Callback function to invoke when an error is returned. The client's default will apply if not provided.
$on_error->( $error )
Subscribes to the given event on the server object, installing a callback function which will be invoked whenever the event is fired.
Takes the following named arguments:
Name of the event
Callback function to invoke whenever the event is fired
$on_fire->( @args )
Optional. Callback function to invoke once the event subscription is successfully installed by the server.
$on_subscribed->()
If this is provided, it is guaranteed to be invoked before any invocation of the on_fire event handler.
Optional. Callback function to invoke when an error is returned. The client's default will apply if not provided.
$on_error->( $error )
Requests the current value of the property from the server object, and invokes a callback function when the value is received.
Takes the following named arguments
The name of the property
Callback function to invoke when the value is returned
$on_value->( $value )
Optional. Callback function to invoke when an error is returned. The client's default will apply if not provided.
$on_error->( $error )
Returns the locally-cached value of a smashed property. If the named property is not a smashed property, an exception is thrown.
Sets the value of the property in the server object. Optionally invokes a callback function when complete.
Takes the following named arguments
The name of the property
New value to set for the property
Optional. Callback function to invoke once the new value is set.
$on_done->()
Optional. Callback function to invoke when an error is returned. The client's default will apply if not provided.
$on_error->( $error )
Watches the given property on the server object, installing callback functions which will be invoked whenever the property value changes.
Takes the following named arguments:
Name of the property
Optional. If true, requests that the server send the current value of the property at the time the watch is installed, in an on_set event. This is performed atomically with installing watch.
Optional. Callback function to invoke once the property watch is successfully installed by the server.
$on_watched->()
If this is provided, it is guaranteed to be invoked before any invocation of the value change handlers.
Optional. Callback function to invoke whenever the property value changes.
$on_updated->( $new_value )
If not provided, then individual handlers for individual change types must be provided.
Optional. Callback function to invoke when an error is returned. The client's default will apply if not provided.
$on_error->( $error )
The set of callback functions that are required depends on the type of the property. These are documented in the watch_property method of Tangence::Object.

Paul Evans <leonerd@leonerd.org.uk>