XGActionMonitor

Inherits from:
Declared In:

Overview

This class allows you to initiate and monitor an action performed on a resource. You normally do not instantiate this class directly, rather you obtain an instance from a performXXXAction method of a resource. Action monitors obtained from a resource have alreadying had the performAction method called upon them. If you create your own action monitors you must call performAction to initiate the action. Once an action monitor's action has either succeeded or failed the outcome of the action monitor changes. Following a change in the outcome the results dictionary contains the result of the action, if any.



Methods

-action

Returns the XGResourceAction being monitored.

-actionDidFail

Returns whether or not the action failed.

-actionDidSucceed

Returns whether or not the action succeeded.

+actionMonitorWithResource:action:

Returns an instance initialized with a resource and an action.

+actionMonitorWithResource:action:

Returns an instance initialized with a resource, action, and parameters.

+actionMonitorWithResource:action:parameters:

Returns an instance initialized with a resource, action, and parameters.

-error

Returns the NSError from the results dictionary, if any.

-initWithResource:action:parameters:

Initializes a XGActionMonitor object.

-outcome

Returns the XGActionMonitorOutcome of the action being monitored.

-parameters

Returns the parameters of the action being monitored.

-performAction

Initates the action being monitored.

-resource

Returns the XGResource instance the monitored action is being performed on.

-results

Returns the results of the action being monitored.


action


Returns the XGResourceAction being monitored.

- (XGResourceAction)action; 
Return Value

The XGResourceAction.


actionDidFail


Returns whether or not the action failed.

- (BOOL)actionDidFail; 
Return Value

The failure of the action.


actionDidSucceed


Returns whether or not the action succeeded.

- (BOOL)actionDidSucceed; 
Return Value

The success of the action.


actionMonitorWithResource:action:


Returns an instance initialized with a resource and an action.

+ (id)actionMonitorWithResource:(XGResource *)resource 
        action:(XGResourceAction)action; 


actionMonitorWithResource:action:


Returns an instance initialized with a resource, action, and parameters.

See Also:

actionMonitorWithResource:action:parameters:

+ (id)actionMonitorWithResource:(XGResource *)resource 
        action:(XGResourceAction)action parameters:(NSDictionary *)parameters; 


actionMonitorWithResource:action:parameters:


Returns an instance initialized with a resource, action, and parameters.

See Also:

actionMonitorWithResource:action:

+ (id)actionMonitorWithResource:(XGResource *)resource 
        action:(XGResourceAction)action parameters:(NSDictionary *)parameters; 


error


Returns the NSError from the results dictionary, if any.

- (NSError *)error; 
Return Value

The NSError instance.


initWithResource:action:parameters:


Initializes a XGActionMonitor object.

- (id)initWithResource:(id)resource action:(XGResourceAction)action 
        parameters:(NSDictionary *)parameters; 
Parameters
resource

The resource upon which the action is to be performed. Must not be nil.

action

The action to perform on the resource.

parameters

The parameters to perform the action with.

Return Value

An initialized XGActionMonitor object.


outcome


Returns the XGActionMonitorOutcome of the action being monitored.

- (XGActionMonitorOutcome)outcome; 
Return Value

The XGActionMonitorOutcome.


parameters


Returns the parameters of the action being monitored.

- (NSDictionary *)parameters; 
Return Value

The parameters dictionary.


performAction


Initates the action being monitored.

- (void)performAction; 
Discussion

This method does not need to be called on XGActionMonitor instances that are returned by XGResource performXXXAction methods.


resource


Returns the XGResource instance the monitored action is being performed on.

- (XGResource *)resource; 
Return Value

The XGResource instance.


results


Returns the results of the action being monitored.

- (NSDictionary *)results; 
Return Value

The results dictionary.

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

 

Last Updated: 2009-08-12