com.pcbsys.nirvana.client.nQueueSyncReader Class Reference

This class provides the client with an synchronous interface into a Nirvana Queue. More...

Inheritance diagram for com.pcbsys.nirvana.client.nQueueSyncReader:
com.pcbsys.nirvana.client.nQueueReader com.pcbsys.nirvana.client.nQueueSyncTransactionReader

Public Member Functions

override void close ()
 Close the reader and the server subscription More...
 
override void closeLocally ()
 Close the reader locally which will n ot result in any rollback of transactional readers More...
 
nConsumeEvent pop ()
 This method places the client on the queue and will block until an event is placed onto the queue. More...
 
nConsumeEvent pop (long timeout)
 This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More...
 
nConsumeEvent pop (long timeout, string selector)
 This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader
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 provides the client with an synchronous interface into a Nirvana Queue.

Events will only be delivered to this client when a call to pop is made.

Member Function Documentation

override void com.pcbsys.nirvana.client.nQueueSyncReader.close ( )
virtual

Close the reader and the server subscription

Implements com.pcbsys.nirvana.client.nQueueReader.

override void com.pcbsys.nirvana.client.nQueueSyncReader.closeLocally ( )
virtual

Close the reader locally which will n ot result in any rollback of transactional readers

Implements com.pcbsys.nirvana.client.nQueueReader.

nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop ( )

This method places the client on the queue and will block until an event is placed onto the queue.

Returns
The popped event
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSecurityExceptionIf your not authorized to perform the operation on the queue
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop ( long  timeout)

This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires.

If the timeout expires it will return null

Parameters
timeoutTime to wait in milliseconds for an event
Returns
The popped event or null if the timeout expired
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSecurityExceptionIf your not authorized to perform the operation on the queue
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error
nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop ( long  timeout,
string  selector 
)

This method places the client on the queue and will block until an event is placed onto the queue or the specified timeout expires.

If the timeout expires it will return null

Parameters
timeoutTime to wait in milliseconds for an event
selectorthe selection string used to filter events being popped
Returns
The popped event or null if the timeout expired
Exceptions
nSessionNotConnectedExceptionClient is not currently connected to the server
nSecurityExceptionIf your not authorized to perform the operation on the queue
nSessionPausedExceptionThe session is currently paused
nIllegalStateExceptionThe operation could not complete because of a session/connection error