- com
- pcbsys
- nirvana
- client
- nQueueSyncReader
This class provides the client with an synchronous interface into a Nirvana Queue. More...
Public Member Functions | |
final nConsumeEvent | pop () throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
This method places thie 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 the 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 thie 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 | |
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... | |
Protected Member Functions | |
void | close () |
Closing the reader releases resources held by the server for this subscription. 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... | |
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.
|
protectedvirtual |
Closing the reader releases resources held by the server for this subscription.
For a transactional reader it also rolls back any uncommitted events
Implements com.pcbsys.nirvana.client.nQueueReader.
Reimplemented in com.pcbsys.nirvana.client.nQueueSyncTransactionReader.
final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop | ( | ) | throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
This method places thie client on the queue and will block until an event is placed onto the queue.
nSessionNotConnectedException | Client is not currently connected to the server |
nSecurityException | If your not authorized to perform the operation on the queue |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop | ( | final long | timeout | ) | throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
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
timeout | Time to wait in milliseconds for an event |
nSessionNotConnectedException | Client is not currently connected to the server |
nSecurityException | If your not authorized to perform the operation on the queue |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |
final nConsumeEvent com.pcbsys.nirvana.client.nQueueSyncReader.pop | ( | final long | timeout, |
final String | selector | ||
) | throws nSessionNotConnectedException, nSessionPausedException, nSecurityException, nIllegalStateException |
This method places thie 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
timeout | Time to wait in milliseconds for an event |
selector | the selection string used to filter events being popped |
nSessionNotConnectedException | Client is not currently connected to the server |
nSecurityException | If your not authorized to perform the operation on the queue |
nSessionPausedException | The session is currently paused |
nIllegalStateException | The operation could not complete because of a session/connection error |