com.pcbsys.nirvana.client.nQueueReader Class Reference

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

boolean hasConsumedEvents ()
 Method to see whether the reader has consumed any events.
boolean isClosed ()
 When a reader is closed, the physical subscription is closed at the server.
boolean isClosedLocally ()
 A reader can be closed, but the physical subscription queue is not closed at the server.
final nConsumeEvent[] peek (final nQueuePeekContext context) throws nSecurityException, nChannelNotFoundException, nSessionNotConnectedException, nRequestTimedOutException, nUnexpectedResponseException,nSessionPausedException, nIllegalArgumentException, nIllegalStateException
 Performs a non destructive read.

Static Public Member Functions

static final nQueuePeekContext createContext (final int windowSize, final String selector)
 Creates a Queue Peek Context, which is used to traverse the queue.
static final nQueuePeekContext createContext (final int windowSize)
 Creates a Queue Peek Context, which is used to traverse the queue.
static final nQueuePeekContext createContext ()
 Creates a Queue Peek Context, which is used to traverse the queue.

Detailed Description

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

Member Function Documentation

static final nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext ( final int  windowSize,
final String  selector 
) [static]

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

Parameters:
windowSize The size of the window over the queue to uses
selector A message selector to be applied on the events received
Returns:
A new nQueuePeekContext

static final nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext ( final int  windowSize  )  [static]

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

Parameters:
windowSize The size of the window over the queue to uses
Returns:
A new nQueuePeekContext

static final nQueuePeekContext com.pcbsys.nirvana.client.nQueueReader.createContext (  )  [static]

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

Returns:
A new nQueuePeekContext

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.

Returns:
true if any events have been consumed by the reader

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 comitted event.

Returns:
true if the reader has been closed

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 comitted event.

Returns:
true if the reader has been closed locally but not at the server

Performs a non destructive read.

Parameters:
context Peek Context to use. Used when multiple calls required to travers a queue
Returns:
An Array of events
Exceptions:
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 unexcepted response
nIllegalArgumentException Invalid paramters passed
nSessionPausedException The session is currently paused, please resume
nIllegalStateException The operation could not complete because of a session/connection error