com.pcbsys.nirvana.client.nQueueSyncFragmentReader Class Reference

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

Inheritance diagram for com.pcbsys.nirvana.client.nQueueSyncFragmentReader:
com.pcbsys.nirvana.client.nQueueReader com.pcbsys.nirvana.client.nQueueSyncTransactionFragmentReader

Public Member Functions

String getReaderId () throws nSessionNotConnectedException
 Returns the server side unique id of the reader. More...
 
final nConsumeEvent pop () throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException
 This method places this client on the queue and will block until an event is placed onto the queue. More...
 
final nConsumeEvent pop (final long timeout) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException
 This method places this client on the queue and will block until an event is placed onto the queue or the specified timeout expires. More...
 
final nConsumeEvent pop (final long timeout, final String selector) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException
 This method places this 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
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...
 
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 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 and after all event fragments have been received.

Deprecated:
Message fragment is not supported in UM hence this class is deprecated as of version 10.7 and will be removed in the subsequent release

Member Function Documentation

String com.pcbsys.nirvana.client.nQueueSyncFragmentReader.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.

final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncFragmentReader.pop ( ) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException

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

This reader behaves exactly like the nQueueSyncReader with the exception that it understands fragmented events and will only return an event when all fragments are received.

Returns
The popped event
Exceptions
com.pcbsys.nirvana.client.nSessionNotConnectedExceptionClient is not currently connected to the server
com.pcbsys.nirvana.client.nSecurityExceptionIf your not authorized to perform the operation on the queue
com.pcbsys.nirvana.client.nSessionPausedExceptionThe session is currently paused
com.pcbsys.nirvana.client.nIllegalStateExceptionThis 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.
final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncFragmentReader.pop ( final long  timeout) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException

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

This reader behaves exactly like the nQueueSyncReader with the exception that it understands fragmented events and will only return an event when all fragments are received. 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
com.pcbsys.nirvana.client.nSessionNotConnectedExceptionClient is not currently connected to the server
com.pcbsys.nirvana.client.nSecurityExceptionIf your not authorized to perform the operation on the queue
com.pcbsys.nirvana.client.nSessionPausedExceptionThe session is currently paused
com.pcbsys.nirvana.client.nIllegalStateExceptionThis 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.
final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncFragmentReader.pop ( final long  timeout,
final String  selector 
) throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException

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

This reader behaves exactly like the nQueueSyncReader with the exception that it understands fragmented events and will only return an event when all fragments are received. 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
com.pcbsys.nirvana.client.nSessionNotConnectedExceptionClient is not currently connected to the server
com.pcbsys.nirvana.client.nSecurityExceptionIf your not authorized to perform the operation on the queue
com.pcbsys.nirvana.client.nSessionPausedExceptionThe session is currently paused
com.pcbsys.nirvana.client.nIllegalStateExceptionThis 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.