SRHubservable Class Reference
| Inherits from | NSObject |
| Declared in | SRHubservable.h |
Tasks
Properties
-
eventNameAn
propertyNSStringobject representing the name of the subscription event -
proxyAn
propertySRHubProxyobject representing the Hub to be observed
Initializing an SRHubservable Object
-
+ observe:event:A convenience method for initWithProxy:(SRHubProxy )proxy eventName:(NSString )eventName;
-
– initWithProxy:eventName:Initializes a new
SRHubservableobject
Adding Subscriptions
-
– subscribe:selector:Adds a new Subscription to the underlying proxy for eventName
Properties
eventName
An NSString object representing the name of the subscription event
@property (strong, nonatomic, readonly) NSString *eventNameDeclared In
SRHubservable.hproxy
An SRHubProxy object representing the Hub to be observed
@property (strong, nonatomic, readonly) SRHubProxy *proxyDeclared In
SRHubservable.hClass Methods
observe:event:
A convenience method for initWithProxy:(SRHubProxy )proxy eventName:(NSString )eventName;
+ (id)observe:(SRHubProxy *)proxy event:(NSString *)eventNameParameters
- proxy
the
SRHubProxyobject representing the Hub to be observed
- eventName
the
NSStringobject representing the name of the subscription event
Return Value
an SRHubservable object
Discussion
SRHubservable *observable = [SRHubservable observe:myHub event:@“myEvent”];
Declared In
SRHubservable.hInstance Methods
initWithProxy:eventName:
Initializes a new SRHubservable object
- (id)initWithProxy:(SRHubProxy *)proxy eventName:(NSString *)eventNameParameters
- proxy
the
SRHubProxyobject representing the Hub to be observed
- eventName
the
NSStringobject representing the name of the subscription event
Return Value
an SRHubservable object
Discussion
SRHubservable *observable = [SRHubservable observe:myHub event:@“myEvent”];
Declared In
SRHubservable.hsubscribe:selector:
- (SRSubscription *)subscribe:(NSObject *)object selector:(SEL)selectorParameters
- object
The receiver to perform selector on
- selector
A selector identifying the message to send.
Return Value
the SRSubscription object created
Declared In
SRHubservable.h