- com
- pcbsys
- nirvana
- client
- nQueueReader
This class is the base class for all Queue Readers and provides a generic reader interface. More...
#include <nQueueReader.h>
Public Member Functions | |
virtual void | close ()=0 |
Close the subscription, and notify the server. | |
virtual void | closeLocally ()=0 |
Close the subscription, but do not notify the server. | |
bool | hasConsumedEvents () |
Method to see whether the reader has consumed any events. More... | |
bool | isClosed () |
When a reader is closed, the physical subscription is closed at the server. More... | |
bool | isClosedLocally () |
A reader can be closed, but the physical subscription queue is not closed at the server. More... | |
nConsumeEvent ** | peek (nQueuePeekContext *pContext, int &nEvent) |
Performs a non destructive read. More... | |
Static Public Member Functions | |
static nQueuePeekContext * | createContext (int windowSize=0, const std::string &selector="") |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
This class is the base class for all Queue Readers and provides a generic reader interface.
|
static |
Creates a Queue Peek Context, which is used to traverse the queue.
windowSize | The size of the window over the queue to uses |
selector | A message selector to be applied on the events received |
bool com::pcbsys::nirvana::client::nQueueReader::hasConsumedEvents | ( | ) |
Method to see whether the reader has consumed any events.
For transactional readers, this is reset every time commit or rollback is called.
bool com::pcbsys::nirvana::client::nQueueReader::isClosed | ( | ) |
When a reader is closed, the physical subscription is closed at the server.
For Transactional readers, a close will rollback to the last committed event.
bool com::pcbsys::nirvana::client::nQueueReader::isClosedLocally | ( | ) |
A reader can be closed, but the physical subscription queue is not closed at the server.
For Transactional readers, a local close will not rollback to the last committed event.
nConsumeEvent** com::pcbsys::nirvana::client::nQueueReader::peek | ( | nQueuePeekContext * | pContext, |
int & | nEvent | ||
) |
Performs a non destructive read.
*pContext | Peek Context to use. Used when multiple calls required to traverse a queue |
nEvent | the length of the array |
nSecurityException | If the client is not authorized to perform this request |
nChannelNotFoundException | The queue was not found |
nSessionNotConnectedException | Client is not currently connected to the server |
nRequestTimedOutException | The server did not respond within the timeout |
nUnexpectedResponseException | The server responded with an unexpected response |
nIllegalArgumentException | Invalid parameters passed |
nSessionPausedException | The session is currently paused, please resume |
nIllegalStateException | The operation could not complete because of a session/connection error |