Inherits from NSOperation
Conforms to STWServiceCallContext
Declared in STWServiceCallOperation.h
STWServiceCallOperation.m

Overview

STWServiceCallOperation class performs Straw Service Method Call procedure.

The operation is performed in main thread or in background according to Service Method configuration.

Properties

bridge

the NativeBridge object

@property (nonatomic, assign) STWNativeBridge *bridge

Discussion

the NativeBridge object

Declared In

STWServiceCallOperation.h

keepAlive

The flag to keep alive the browser’s callback function.

@property (nonatomic, assign) BOOL keepAlive

Discussion

The flag to keep alive the browser’s callback function.

The default value is NO.

Declared In

STWServiceCallOperation.h

service

Service which the instance performs with

@property (nonatomic, assign) id<STWService> service

Discussion

Service which the instance performs with

Declared In

STWServiceCallOperation.h

serviceCall

Service Call which the instance performs with

@property (nonatomic, retain) STWServiceCall *serviceCall

Discussion

Service Call which the instance performs with

Declared In

STWServiceCallOperation.h

Instance Methods

failWithCode:withMessage:

Fails the Service Method call with an error code and a message.

- (void)failWithCode:(NSInteger)code withMessage:(NSString *)message

Parameters

code

error code

message

error message

Discussion

Fails the Service Method call with an error code and a message.

Declared In

STWServiceCallContext.h

initWithCall:withService:withBridge:

Initialize object with service call object, service object and bridge object

- (instancetype)initWithCall:(STWServiceCall *)call withService:(id<STWService>)service withBridge:(STWNativeBridge *)bridge

Parameters

call

Service call object

service

service object

bridge

native bridge object

Return Value

service call operation instance

Discussion

Initialize object with service call object, service object and bridge object

Declared In

STWServiceCallOperation.h

succeed

Succeeds the Service Method call (without any information).

- (void)succeed

Discussion

Succeeds the Service Method call (without any information).

Declared In

STWServiceCallContext.h

succeedWithNumber:

Succeeds the Service Method call with a number.

- (void)succeedWithNumber:(NSNumber *)number

Parameters

number

success result number

Discussion

Succeeds the Service Method call with a number.

Declared In

STWServiceCallContext.h

succeedWithObject:

Succeeds the Service Method call with a (NSDictionary *)object

- (void)succeedWithObject:(NSDictionary *)object

Parameters

object

success result object

Discussion

Succeeds the Service Method call with a (NSDictionary *)object

Declared In

STWServiceCallContext.h

succeedWithString:

Succeeds the Service Method call with a string.

- (void)succeedWithString:(NSString *)string

Parameters

string

success result string

Discussion

Succeeds the Service Method call with a string.

Declared In

STWServiceCallContext.h