Packagecom.pcbsys.nirvana.client
Classpublic class nQueueReaderContext
InheritancenQueueReaderContext Inheritance Object

This class is used to construct a Queue Reader.



Public Properties
 PropertyDefined By
  listener : nEventListener
Returns the current event listener being used
nQueueReaderContext
  maintainPriority : Boolean
Return whether the priority assignment for queue receivers is enabled.
nQueueReaderContext
  selector : String
Returns the current selector that this context was constructed with, could be null.
nQueueReaderContext
  timeout : Number
Retrieves the current timeout (milliseconds) for any transactional operations, i.e.
nQueueReaderContext
  window : Long
Retrieves the current window size.
nQueueReaderContext
Public Methods
 MethodDefined By
  
nQueueReaderContext(eventListener:nEventListener, selector:String, windowSize:Long = null, timeout:Number = 1, maintainPriority:Boolean = false)
This constructor supports an asynchronous queue reader, if applied to a synchronous queue reader the listener is ignored.
nQueueReaderContext
Property Detail
listenerproperty
listener:nEventListener

Returns the current event listener being used


Implementation
    public function get listener():nEventListener
    public function set listener(value:nEventListener):void
maintainPriorityproperty 
maintainPriority:Boolean

Return whether the priority assignment for queue receivers is enabled. If so, multiple queue readers can be connected to a queue, but only one reader will consume the events at a time. The first reader will have priority, until the reader is removed, at which time the next reader will take over.


Implementation
    public function get maintainPriority():Boolean
    public function set maintainPriority(value:Boolean):void
selectorproperty 
selector:String

Returns the current selector that this context was constructed with, could be null.


Implementation
    public function get selector():String
    public function set selector(value:String):void
timeoutproperty 
timeout:Number

Retrieves the current timeout (milliseconds) for any transactional operations, i.e. commit / rollback of events. If the timeout is set to 0, if the operation fails, an error will be thrown. If the timeout is less than 0, the commit / rollback will be retried if it fails, until it succeeds. If greater than 0 =, upon failure, the commit / rollback will be retried until the timeout period is reached


Implementation
    public function get timeout():Number
    public function set timeout(value:Number):void
windowproperty 
window:Long

Retrieves the current window size. This is the number of events the server will send prior to expecting an rollback or a commit. No more events will be sent when this number is reached an no call is made.


Implementation
    public function get window():Long
    public function set window(value:Long):void
Constructor Detail
nQueueReaderContext()Constructor
public function nQueueReaderContext(eventListener:nEventListener, selector:String, windowSize:Long = null, timeout:Number = 1, maintainPriority:Boolean = false)

This constructor supports an asynchronous queue reader, if applied to a synchronous queue reader the listener is ignored. The message selector will be applied to all events prior to being delivered to the client from the server.

Parameters
eventListener:nEventListener — Asynchronous callback object
 
selector:String — Message selector to be applied to the events prior to being delivered to the client
 
windowSize:Long (default = null) — long of events that the server will deliver prior to expecting a commit or rollback
 
timeout:Number (default = 1) — the length of time (milliseconds) a commit or rollback will be attempted for after failure, less than 0 = infintite, 0 = once, greater than 0 = retry for this period
 
maintainPriority:Boolean (default = false)

Throws
nIllegalArgumentError — If the window size is negative