- com
- pcbsys
- nirvana
- client
- nQueueReader
This class is the base class for all Queue Readers and provides a generic reader interface. More...
Public Member Functions | |
abstract String | getReaderId () throws nSessionNotConnectedException |
Returns the server side unique id of the reader. More... | |
boolean | hasConsumedEvents () |
Method to see whether the reader has consumed any events. More... | |
boolean | isClosed () |
When a reader is closed, the physical subscription is closed at the server. More... | |
boolean | isClosedLocally () |
A reader can be closed, but the physical subscription queue is not closed at the server. More... | |
final nConsumeEvent[] | peek (final nQueuePeekContext context) throws nSecurityException, nChannelNotFoundException, nSessionNotConnectedException, nRequestTimedOutException, nUnexpectedResponseException, nSessionPausedException, nIllegalArgumentException, nIllegalStateException |
Performs a non destructive read. More... | |
Static Public Member Functions | |
static nQueuePeekContext | createContext () |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (final int windowSize) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
static nQueuePeekContext | createContext (final int windowSize, final String selector) |
Creates a Queue Peek Context, which is used to traverse the queue. More... | |
Protected Attributes | |
final int | myUniqueReaderId |
The unique id of this nQueueReader instance. 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.
|
static |
Creates a Queue Peek Context, which is used to traverse the queue.
windowSize | The size of the window over the queue to uses |
|
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 |
|
pure virtual |
Returns the server side unique id of the reader.
This ID can change after subscriber reconnect.
nSessionNotConnectedException | - if the session is not currently connected to the server. |
Implemented in com.pcbsys.nirvana.client.nQueueSyncReader, com.pcbsys.nirvana.client.nQueueSyncFragmentReader, and com.pcbsys.nirvana.client.nQueueAsyncReader.
boolean 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.
boolean 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.
boolean 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.
final nConsumeEvent [] com.pcbsys.nirvana.client.nQueueReader.peek | ( | final nQueuePeekContext | context | ) | throws nSecurityException, nChannelNotFoundException, nSessionNotConnectedException, nRequestTimedOutException, nUnexpectedResponseException, nSessionPausedException, nIllegalArgumentException, nIllegalStateException |
Performs a non destructive read.
context | Peek Context to use. Used when multiple calls required to travers a queue |
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 | This exception is raised if there is any issues with any of the arguments used by this method. One condition of this is if this object has been invalidated and no longer can be utilised, this can occur if a delete request has been issued to the connected server. |
|
protected |
The unique id of this nQueueReader instance.
This will be set automatically when creating the reader and sent to the server with each nPopQueue operation.