The classic client API will be removed in a future release.
@Deprecated public interface PagedTopicHandler
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
ServerConnection.createPagedTopicHandler(TopicMessage, PagedTopicListener)
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 Listener
declared to the
client connection
object.
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Close the Topic.
|
ServerConnection |
getConnection()
Deprecated.
Get the connection (the client object that created the handler).
|
void |
open(int linesPerPage,
int openPage)
Deprecated.
Open the Topic.
|
void |
page(int number)
Deprecated.
Requests a page by absolute page number.
|
void |
page(PageOption page)
Deprecated.
Requests a page, relative to the current page.
|
ServerConnection getConnection()
void open(int linesPerPage, int openPage) throws APIException
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.openPage
- 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
PagedTopicListener.page(PagedTopicHandler, PageStatus, Lines)
method of the associated listener.APIException
- if unable to openvoid page(PageOption page) throws APIException
The resulting page will be received on the
PagedTopicListener.page(PagedTopicHandler, PageStatus, Lines)
method of the associated listener.
page
- specifies the page option required.APIException
- if the Topic is not open or the request fails.void page(int number) throws APIException
number
- the page number or -1 to indicate the last page.APIException
- if the Topic is not open or the request fails.void close() throws APIException
The Topic will remain subscribed but no more notifications will be received and no requests can be sent.
APIException
- if unable to send close requestCopyright © 2016 Push Technology Ltd. All Rights Reserved.