com.pcbsys.nirvana.client.nQueuePeekContext Class Reference

Provides a context when peeking on the queue. More...


Public Member Functions

final int getIndex ()
 Returns the index into the queue that the context is up to.
final String getSelector ()
 Retrieves the message selector (if any) set to filter events on this peek context.
final int getWindowSize ()
 Retrieves the size of the window used by this queue peek context.
final boolean hasMore ()
 Returns a boolean indicating if there are any more events in the queue.
 nQueuePeekContext (final int windowSize, final String selector)
 Creates a queue peek context with the specified window size and message selector to filter events with.
 nQueuePeekContext (final int windowSize)
 Creates a queue peek context with the specified window size.
 nQueuePeekContext ()
 Default constructor that creates a queue peek context.
final void setHasMore (final boolean flag)
 Sets the flag to true if more events in the queue.
final void setIndex (final int idx)
final void setWindowSize (final int size)
 Sets the size of the window.

Detailed Description

Provides a context when peeking on the queue.

Useful when multple calls are required to traverse the entire queue.


Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nQueuePeekContext.nQueuePeekContext ( final int  windowSize  ) 

Creates a queue peek context with the specified window size.

Parameters:
windowSize Number of events which will be delivered to the client per lookup

com.pcbsys.nirvana.client.nQueuePeekContext.nQueuePeekContext ( final int  windowSize,
final String  selector 
)

Creates a queue peek context with the specified window size and message selector to filter events with.

Parameters:
windowSize Number of events which will be delivered to the client per lookup
selector Message selector to apply to the events


Member Function Documentation

final int com.pcbsys.nirvana.client.nQueuePeekContext.getIndex (  ) 

Returns the index into the queue that the context is up to.

Returns:
current index

final String com.pcbsys.nirvana.client.nQueuePeekContext.getSelector (  ) 

Retrieves the message selector (if any) set to filter events on this peek context.

Returns:
the selector used by this context

final int com.pcbsys.nirvana.client.nQueuePeekContext.getWindowSize (  ) 

Retrieves the size of the window used by this queue peek context.

Returns:
The size of the window

final boolean com.pcbsys.nirvana.client.nQueuePeekContext.hasMore (  ) 

Returns a boolean indicating if there are any more events in the queue.

Returns:
true if more

final void com.pcbsys.nirvana.client.nQueuePeekContext.setHasMore ( final boolean  flag  ) 

Sets the flag to true if more events in the queue.

(Server specific).

Parameters:
flag to specify whether there are more events to come

final void com.pcbsys.nirvana.client.nQueuePeekContext.setIndex ( final int  idx  ) 

Parameters:
idx Index value to set

final void com.pcbsys.nirvana.client.nQueuePeekContext.setWindowSize ( final int  size  ) 

Sets the size of the window.

Parameters:
size A size greater than 0