STWServiceCallOperation Class Reference
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.
Tasks
Other Methods
-
serviceCall
property -
service
property -
bridge
property -
keepAlive
property -
– initWithCall:withService:withBridge:
Other Methods
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
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:
- (instancetype)initWithCall:(STWServiceCall *)call withService:(id<STWService>)service withBridge:(STWNativeBridge *)bridge
Return Value
service call operation instance
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