DEPRECATED: Diffusion iOS Classic API  5.9.4
 All Data Structures Files Functions Variables Enumerations Enumerator Properties Macros Pages
DFPagedTopicHandler Class Reference

A Paged Topic Handler. More...

#import <DFPagedTopicHandler.h>

Inheritance diagram for DFPagedTopicHandler:
Collaboration diagram for DFPagedTopicHandler:

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.
 
- Instance Methods inherited from <DFTopicListenerDelegate>
(BOOL) - onMessage:
 This method is called if the TopicMessage matches the message received from Diffusion.
 
(NSString *) - getTopic
 getTopic.
 

Properties

DFClientconnection
 Get the connection (the client object that created the handler).
 
NSString * topicName
 Get the topic-name associated with this handler.
 

Detailed Description

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.

Author
Martin Cowie - created 6 Jan 2012
Since
4.1

Method Documentation

- (void) close

Close the Topic.

The Topic will remain subscribed but no more notifications will be received and no requests can be sent.

Exceptions
DFExceptionif 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.

Parameters
linesPerPagethe number of lines required per page. This must be a positive value.
pagespecifies 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.
Exceptions
DFExceptionif 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.

Parameters
pageOptionspecifies the page option required.
Exceptions
DFExceptionif the Topic is not open or the request fails.
- (void) pageNumber: (int)  pageNumber

Requests a page by absolute page number.

Parameters
pageNumberthe page number or -1 to indicate the last page.
Exceptions
DFExceptionif the Topic is not open or the request fails.

Property Documentation

- (DFClient*) connection
readnonatomicweak

Get the connection (the client object that created the handler).

- (NSString*) topicName
readnonatomicassign

Get the topic-name associated with this handler.


The documentation for this class was generated from the following file: