![]() |
DEPRECATED: Diffusion iOS Classic API
5.9.4
|
A Paged Topic Handler. More...
#import <DFPagedTopicHandler.h>
Instance Methods | |
(void) | - openLinesPerPage:onPage: |
Open the Topic. | |
(void) | - page: |
Requests a page, relative to the current page. | |
(void) | - pageNumber: |
Requests a page by absolute page number. | |
(void) | - close |
Close the Topic. | |
![]() | |
(BOOL) | - onMessage: |
This method is called if the TopicMessage matches the message received from Diffusion. | |
(NSString *) | - getTopic |
getTopic. | |
Properties | |
DFClient * | connection |
Get the connection (the client object that created the handler). | |
NSString * | topicName |
Get the topic-name associated with this handler. | |
A Paged Topic Handler.
This is an object which is used to send commands to a 'paged' Topic. (see PagedTopicData). The handler simplifies the use of such a Topic and avoids having to format messages to send to the Topic or parse messages received from it.
Such a handler is created using [DFClient createPagedTopicHandlerWithMessage:andDelegate] and all notifications from the Topic will be routed through the supplied listener.
When such a handler is in use then messages received on the Topic will not be delivered to the DFClientListener delegate declared to the DFClient object.
- (void) close |
Close the Topic.
The Topic will remain subscribed but no more notifications will be received and no requests can be sent.
DFException | if unable to send close request |
- (void) openLinesPerPage: | (int) | linesPerPage | |
onPage: | (int) | page | |
Open the Topic.
This is used to request the initial page and then receive updates. Updates will be received until [close] is called or the Topic is unsubscribed.
If the Topic is already open then this may be called again to resubmit with a different number of lines if required.
linesPerPage | the number of lines required per page. This must be a positive value. |
page | specifies the first page to be sent. This can be an absolute page number (from 1 to n) or -1 to indicate the current last page. The resulting page will be received on the [DFPagedTopicDelegate pageWithLines:status:handler:] method of the associated listener. |
DFException | if linesPerPage is not positive |
- (void) page: | (DFPageOption) | pageOption |
Requests a page, relative to the current page.
The resulting page will be received on the [DFPagedTopicDelegate pageWithLines:status:handler:] method of the associated delegate.
pageOption | specifies the page option required. |
DFException | if the Topic is not open or the request fails. |
- (void) pageNumber: | (int) | pageNumber |
Requests a page by absolute page number.
pageNumber | the page number or -1 to indicate the last page. |
DFException | if the Topic is not open or the request fails. |
|
readnonatomicweak |
Get the connection (the client object that created the handler).
|
readnonatomicassign |
Get the topic-name associated with this handler.