com.pcbsys.nirvana.client.nQueueReader Class Referenceabstract

This class is the base class for all Queue Readers and provides a generic reader interface. More...

Inheritance diagram for com.pcbsys.nirvana.client.nQueueReader:
com.pcbsys.nirvana.client.nQueueAsyncReader com.pcbsys.nirvana.client.nQueueSyncFragmentReader com.pcbsys.nirvana.client.nQueueSyncReader com.pcbsys.nirvana.client.nQueueAsyncTransactionReader com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader com.pcbsys.nirvana.client.nQueueSyncTransactionReader

Public Member Functions

abstract void close ()
 This method is for internal use only More...
 
abstract void closeLocally ()
 This method is for internal use only More...
 
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 context)
 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 (int windowSize)
 Creates a Queue Peek Context, which is used to traverse the queue. More...
 
static nQueuePeekContext createContext (int windowSize, string selector)
 Creates a Queue Peek Context, which is used to traverse the queue. More...
 

Detailed Description

This class is the base class for all Queue Readers and provides a generic reader interface.

Member Function Documentation

abstract void com.pcbsys.nirvana.client.nQueueReader.close ( )
pure virtual

This method is for internal use only

Abstract interface to be overridden by sub classes. Close the reader and the server subscription

Implemented in com.pcbsys.nirvana.client.nQueueSyncFragmentReader, com.pcbsys.nirvana.client.nQueueSyncReader, and com.pcbsys.nirvana.client.nQueueAsyncReader.

abstract void com.pcbsys.nirvana.client.nQueueReader.closeLocally ( )
pure virtual

This method is for internal use only

Abstract interface to be overridden by sub classes. Close the subscription, but do not notify the server

Implemented in com.pcbsys.nirvana.client.nQueueSyncFragmentReader, com.pcbsys.nirvana.client.nQueueSyncReader, and com.pcbsys.nirvana.client.nQueueAsyncReader.

static nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext ( )
static

Creates a Queue Peek Context, which is used to traverse the queue.

Returns
A new nQueuePeekContext
static nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext ( int  windowSize)
static

Creates a Queue Peek Context, which is used to traverse the queue.

Parameters
windowSizeThe size of the window over the queue to uses
Returns
A new nQueuePeekContext
static nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext ( int  windowSize,
string  selector 
)
static

Creates a Queue Peek Context, which is used to traverse the queue.

Parameters
windowSizeThe size of the window over the queue to uses
selectorA message selector to be applied on the events received
Returns
A new nQueuePeekContext
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.

Returns
true if any events have been consumed by the reader
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.

Returns
true if the reader has been closed
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.

Returns
true if the reader has been closed locally but not at the server
nConsumeEvent [] com.pcbsys.nirvana.client.nQueueReader.peek ( nQueuePeekContext  context)

Performs a non destructive read

Parameters
contextPeek Context to use. Used when multiple calls required to travers a queue
Returns
An Array of events
Exceptions
nSecurityExceptionIf the client is not authorized to perform this request
nChannelNotFoundExceptionThe queue was not found
nSessionNotConnectedExceptionClient is not currently connected to the server
nRequestTimedOutExceptionThe server did not respond within the timeout
nUnexpectedResponseExceptionThe server responded with an unexcepted response
nIllegalArgumentExceptionInvalid paramters passed
nSessionPausedExceptionThe session is currently paused, please resume
nIllegalStateExceptionThe operation could not complete because of a session/connection error