NIMEventSubscribeManager Protocol Reference

Conforms to NSObject
Declared in NIMEventSubscribeManagerProtocol.h

Overview

Event subscription protocol

– publishEvent:completion: required method

Publish an event

- (void)publishEvent:(NIMSubscribeEvent *)event completion:(nullable NIMEventSubscribeBlock)completion

Parameters

event

The event to be published. The event can be subscribed by others

completion

Completion callback

Discussion

Publish an event

Declared In

NIMEventSubscribeManagerProtocol.h

– subscribeEvent:completion: required method

Subscribe event

- (void)subscribeEvent:(NIMSubscribeRequest *)request completion:(nullable NIMEventSubscribeResponseBlock)completion

Parameters

request

subscribe request

completion

Completion callback

Discussion

Subscribe event

The request must contain type, expiry, and publishers fields

Declared In

NIMEventSubscribeManagerProtocol.h

– unSubscribeEvent:completion: required method

Unsubscribe event

- (void)unSubscribeEvent:(NIMSubscribeRequest *)request completion:(nullable NIMEventSubscribeResponseBlock)completion

Parameters

request

unsubscribe request

completion

Completion callback

Discussion

Unsubscribe event

The type field must be specified in the request. If the publishers field is not set, all subscription relationships of the specified event will be cancelled.

Declared In

NIMEventSubscribeManagerProtocol.h

– querySubscribeEvent:completion: required method

Query subscribed events

- (void)querySubscribeEvent:(NIMSubscribeRequest *)request completion:(nullable NIMEventSubscribeQueryBlock)completion

Parameters

request

Request to query subscribed events

completion

Completion callback

Discussion

Query subscribed events

The type and publishers field must be specified in the request.

Declared In

NIMEventSubscribeManagerProtocol.h

– addDelegate: required method

Add a notification object

- (void)addDelegate:(id<NIMEventSubscribeManagerDelegate>)delegate

Parameters

delegate

notification object

Discussion

Add a notification object

Declared In

NIMEventSubscribeManagerProtocol.h

– removeDelegate: required method

Remove a notification object

- (void)removeDelegate:(id<NIMEventSubscribeManagerDelegate>)delegate

Parameters

delegate

notification object

Discussion

Remove a notification object

Declared In

NIMEventSubscribeManagerProtocol.h