Package | com.pcbsys.nirvana.client |
Class | public class nQueue |
Inheritance | nQueue nStore flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
queueAttributes : nQueueAttributes [read-only]
This method will return the nQueueAttributes associated with the nQueue object
| nQueue |
Method | Defined By | ||
---|---|---|---|
Gets the attributes associated with this store
| nStore | ||
createAsynchronousReader(context:nQueueReaderContext, asynchronousReaderCB:Function = null):void
Creates an Asynchronous queue reader. | nQueue | ||
createAsynchronousTransactionalReader(context:nQueueReaderContext, asynchronousTransactionalReaderCB:Function = null):void
Creates an Asynchronous Transactional queue reader. | nQueue | ||
destroyReader(reader:nQueueReader):void [static]
This call will release any outstanding resources on the server and close the reader. | nQueue | ||
destroyReaderLocally(reader:nQueueReader):void [static]
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
| nQueue | ||
lastEID(lastEIDCB:Function = null):void
Gets the last event id of this channel
| nQueue | ||
name():String [override]
Gets the name of this queue
| nQueue | ||
purge(purgeEvtCB:Function = null, selector:String = null):void
Purges all events from this queue within the bounds of startEID to endEID
| nQueue | ||
push(event:nConsumeEvent):void
Pushes an event on to the queue. | nQueue | ||
requestDetails(detailsCB:Function):void
This method returns in a callback the current queue details. | nQueue | ||
size(sizeCB:Function = null):void
Returns the number of events waiting in the queue. | nQueue |
Constant | Defined By | ||
---|---|---|---|
nLastEIDEventString : String = nLastEIDEventString [static] String used for nLastEIDEvent to be dispatched | nQueue | ||
nPurgeEventString : String = nPurgeEventString [static] String used for nPurgeEvent to be dispatched | nQueue | ||
nQueueDetailsEventString : String = nQueueDetailsEventString [static] String used for nQueueDetailsEvent to be dispatched | nQueue | ||
nQueueReaderEventString : String = nQueueReaderEventString [static] String used for nQueueReaderEvent to be dispatched | nQueue | ||
nQueueSizeEventString : String = nQueueSizeEventString [static] String used for nQueueSizeEvent to be dispatched | nQueue |
queueAttributes | property |
queueAttributes:nQueueAttributes
[read-only] This method will return the nQueueAttributes associated with the nQueue object
Implementation
public function get queueAttributes():nQueueAttributes
createAsynchronousReader | () | method |
public function createAsynchronousReader(context:nQueueReaderContext, asynchronousReaderCB:Function = null):void
Creates an Asynchronous queue reader.
In this model the server will record that the client is interested in events from this queue and will maintain an outstanding
pop()
and as events are received on the queue they are automatically delivered to the client via a callback. The events
are auto acknowledged on the server once they have been delivered to the client.
Parameters
context:nQueueReaderContext — contains the readers context to be used during construction of the reader
| |
asynchronousReaderCB:Function (default = null ) — this is a function callback that will be passed a nQueueAsynchronousReader. If you wish for a event to be dispatched set to null, a nQueueReaderEvent will be dispatched and the listener string is nQueueReaderEventString
|
Throws
nQueueAsynchronousReaderOutstandingError — If called when there is a outstanding request
| |
nQueueReaderContextNullError — If a null nQueueReaderContext is supplied
| |
nSessionNotConnectedError — if you have been disconnected from the server
| |
nStoreAlreadySubscribedError — if you area attempting to subscribe when a subscription already exists
| |
nSessionNotInitialisedError — if you have not initialised the session
|
createAsynchronousTransactionalReader | () | method |
public function createAsynchronousTransactionalReader(context:nQueueReaderContext, asynchronousTransactionalReaderCB:Function = null):void
Creates an Asynchronous Transactional queue reader.
This is similar in operation to the Asynchronous model, except the server does not auto acknowledge the events, this enables the client to perform
commit()
or rollback()
operations. The server will stop delivering events to this client
once the WindowSize
has been reached, the client will need to call either commit()
or rollback()
before events are delivered again.
Parameters
context:nQueueReaderContext — contains the readers context to be used during construction of the reader
| |
asynchronousTransactionalReaderCB:Function (default = null ) — this is a function callback that will be passed a nQueueAsynchronousTransactionalReader.
If you wish for a event to be dispatched set to null, a nQueueReaderEvent will be dispatched and the listener string is nQueueReaderEventString
|
destroyReader | () | method |
public static function destroyReader(reader:nQueueReader):void
This call will release any outstanding resources on the server and close the reader.
Parameters
reader:nQueueReader — The reader to close
|
Throws
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
destroyReaderLocally | () | method |
public static function destroyReaderLocally(reader:nQueueReader):void
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
Parameters
reader:nQueueReader — The reader to close
|
lastEID | () | method |
public function lastEID(lastEIDCB:Function = null):void
Gets the last event id of this channel
Parameters
lastEIDCB:Function (default = null ) — a callback function that could be passed a long. Set to null if you would like a event to be dispatched, the event will be a nLastEIDEvent the listener string is nLastEIDEventString.
|
Throws
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
name | () | method |
override public function name():String
Gets the name of this queue
ReturnsString — String specifying the name of this queue
|
purge | () | method |
public function purge(purgeEvtCB:Function = null, selector:String = null):void
Purges all events from this queue within the bounds of startEID to endEID
Parameters
purgeEvtCB:Function (default = null ) — This callback function could be passed a error if the purge is unsuccessful. Set to null if you wish to have a event dispatched, the event is a nPurgeEvent and the listener string is nPurgeEventString
| |
selector:String (default = null ) — a string specifying a filter to this subscription request
|
Throws
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
push | () | method |
public function push(event:nConsumeEvent):void
Pushes an event on to the queue.
Parameters
event:nConsumeEvent — the nConsumeEvent to push
|
Throws
nConsumeEventNullError — if a null nConsumeEvent is passed as a argument
| |
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
requestDetails | () | method |
public function requestDetails(detailsCB:Function):void
This method returns in a callback the current queue details.
Parameters
detailsCB:Function — this is a function callback that takes as an argument nQueueDetails. Set to null if you want a event to be dispatched, the event will be a nQueueDetailsEvent and the listener string is nQueueDetailsEventString
|
Throws
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
size | () | method |
public function size(sizeCB:Function = null):void
Returns the number of events waiting in the queue.
Parameters
sizeCB:Function (default = null ) — this is a function callback that takes as an argument int. Set to null if you want a event dispatched, the event will be a nQueueSizeEvent and the listener string is nQueueSizeEventString
|
Throws
nSessionNotConnectedError — if you have been disconnected from the server
| |
nSessionNotInitialisedError — if you have not initialised the session
|
nLastEIDEventString | Constant |
public static const nLastEIDEventString:String = nLastEIDEventString
String used for nLastEIDEvent to be dispatched
nPurgeEventString | Constant |
public static const nPurgeEventString:String = nPurgeEventString
String used for nPurgeEvent to be dispatched
nQueueDetailsEventString | Constant |
public static const nQueueDetailsEventString:String = nQueueDetailsEventString
String used for nQueueDetailsEvent to be dispatched
nQueueReaderEventString | Constant |
public static const nQueueReaderEventString:String = nQueueReaderEventString
String used for nQueueReaderEvent to be dispatched
nQueueSizeEventString | Constant |
public static const nQueueSizeEventString:String = nQueueSizeEventString
String used for nQueueSizeEvent to be dispatched