XGResource

Inherits from:
Declared In:

Overview

This is the base class of all objects that represent a (remote) grid resource. You never deal with instances of XGResource, only subclasses. The XGResource interface exposes the concept of "updating" whereby the local (proxy) object updates it's internal state to match the remote resource the object represents.



Methods

-actionMonitors

Returns the XGActionMonitor instances currently monitoring an action for the receiver.

-connection

Returns the connection associated with the receiver's controller.

-controller

Returns the XGController instance responsible for the resource represented by the receiver.

-identifier

Returns the unique identifier of the receiver's resource.

-isUpdated

Returns YES if the receiver has successfully updated at least once since the connection opened.

-isUpdating

Returns YES if the receiver is in the process of updating.

-performAction:withParameters:

Causes the receiver to attempt to perform the action.

-state

Returns the state of the receiver.


actionMonitors


Returns the XGActionMonitor instances currently monitoring an action for the receiver.

- (NSArray *)actionMonitors; 
Return Value

The array of XGActionMonitor instances.


connection


Returns the connection associated with the receiver's controller.

- (XGConnection *)connection; 
Return Value

The receiver's connection.


controller


Returns the XGController instance responsible for the resource represented by the receiver.

- (XGController *)controller; 
Return Value

The responsible XGController instance.


identifier


Returns the unique identifier of the receiver's resource.

- (NSString *)identifier; 
Return Value

The unique identifier of the receiver's resource.

Discussion

The identifier is a unique string assigned to the resouce by the Xgrid controller. All resources managed by a particular Xgrid controller are guaranteed to have a unique identifier, but no guarantee of uniqueness is made between multiple Xgrid controllers.


isUpdated


Returns YES if the receiver has successfully updated at least once since the connection opened.

- (BOOL)isUpdated; 
Return Value

Whether or not the receiver is updated.


isUpdating


Returns YES if the receiver is in the process of updating.

- (BOOL)isUpdating; 
Return Value

Whether or not the receiver is updating.


performAction:withParameters:


Causes the receiver to attempt to perform the action.

- (XGActionMonitor *)performAction:(XGResourceAction)action 
        withParameters:(NSDictionary *)parameters; 
Parameters
action

The action to perform.

parameters

The parameters to include with the action request.

Return Value

An XGActionMonitor instance initialized to monitor the action.

Discussion

The returned XGActionMonitor object may be used to monitor the progress, success, or failure of the action. The parameters are specific to the action being taken, and may be nil.


state


Returns the state of the receiver.

- (XGResourceState)state; 
Return Value

The state of the receiver.

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-08-12