com.pcbsys.nirvana.client.nQueueAsyncReader Class Reference

This Reader enables the client to receive all events asynchronous. More...

Inheritance diagram for com.pcbsys.nirvana.client.nQueueAsyncReader:
com.pcbsys.nirvana.client.nQueueReader com.pcbsys.nirvana.client.nQueueAsyncTransactionReader

Public Member Functions

String getReaderId () throws nSessionNotConnectedException
 Returns the server side unique id of the reader. More...
 
boolean isPaused ()
 Returns true if the subscription of the reader is currently paused. More...
 
void pauseReader () throws nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException
 Pause the subscription of the nQueueAsyncReader. More...
 
void resumeReader () throws nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException
 Resumes the subscription of the nQueueAsyncReader. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nQueueReader
void destroyReader () throws nUnexpectedResponseException, nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException
 This call will release any outstanding resources on the server and close the reader. More...
 
void destroyReaderLocally ()
 This call will close local reader resources but remain subscribed at the server Any future calls to this object will work unless destroyReader() is called. More...
 
int getUniqueReaderId ()
 Returns the id of the nQueueReader instance which is automatically set on reader creation and sent to the server with each nPopQueue operation. 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...
 

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 (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 inherited from com.pcbsys.nirvana.client.nQueueReader
final int myUniqueReaderId
 The unique id of this nQueueReader instance. More...
 

Detailed Description

This Reader enables the client to receive all events asynchronous.

The callback method was passed as part of the nQueueReaderContext. This class provides no pop methods, since it is all asynchronous delivery.

Member Function Documentation

String com.pcbsys.nirvana.client.nQueueAsyncReader.getReaderId ( ) throws nSessionNotConnectedException
virtual

Returns the server side unique id of the reader.

This ID can change after subscriber reconnect.

Returns
the unique reader id
Exceptions
nSessionNotConnectedException- if the session is not currently connected to the server.

Implements com.pcbsys.nirvana.client.nQueueReader.

boolean com.pcbsys.nirvana.client.nQueueAsyncReader.isPaused ( )

Returns true if the subscription of the reader is currently paused.

False otherwise.

void com.pcbsys.nirvana.client.nQueueAsyncReader.pauseReader ( ) throws nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException

Pause the subscription of the nQueueAsyncReader.

This means that no new events will be received from the server until the subscription is resumed. All events that have already been received will be processed normally.

Exceptions
nSessionPausedExceptionThe session is currently paused, please resume
nSessionNotConnectedExceptionThe session is not currently connected to the server
nRequestTimedOutExceptionif the request exceeded the timeout value
nChannelNotFoundExceptionThe specified queue could not be found
Since
10.7
void com.pcbsys.nirvana.client.nQueueAsyncReader.resumeReader ( ) throws nSessionPausedException, nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException

Resumes the subscription of the nQueueAsyncReader.

See Also
nQueueAsyncReader#pauseReader()
Exceptions
nSessionPausedExceptionThe session is currently paused, please resume
nSessionNotConnectedExceptionThe session is not currently connected to the server
nRequestTimedOutExceptionif the request exceeded the timeout value
nChannelNotFoundExceptionThe specified queue could not be found
Since
10.7