Handles the queue of FlashrRequest objects sent to the Flickr API.
This code and documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0. http://creativecommons.org/licenses/by-nc-sa/2.0/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0.5.0
Kelvin Luck < kelvin at kelvinluck dot com >
$Id: FlashrRequestQueue.as 82 2006-09-10 18:43:14Z kluck $
| com. kelvinluck. flashr. core. FlashrRequestQueue | Handles the queue of FlashrRequest objects sent to the Flickr API. |
| FlashrRequestQueue | Private constructor - there should only be one queue so use getInstance to get it... |
| clearQueue | Empties the queue. |
| getNext | Get the next FlashrRequest Object to be sent to flickr.com and removes it from the queue. |
| addToQueue | Adds a FlashrRequest to the queue. |
| removeFromQueue | Removes a given request from the queue. |
| isEmpty | Tells you whether the request queue is empty or not. |
| getTopPriority | Tells you the priority of the FlashrRequest which is currently at the front of the queue. |
| setPriority | Sets the priority of the passed FlashrRequest to the passed value if the FlashrRequest is in the queue, otherwise returns false |
| getInstance | Gets a reference to the Singleton instance of this class. |
| toString |
private function FlashrRequestQueue()
Private constructor - there should only be one queue so use getInstance to get it...
function getNext():FlashrRequest
Get the next FlashrRequest Object to be sent to flickr.com and removes it from the queue.
The next FlashrRequest Object to be sent to flickr.com.
function addToQueue( request: FlashrRequest, priority: Number )
Adds a FlashrRequest to the queue.
| request | The FlashrRequest you want to add to the queue. |
| priority | The priority of this request. |
function removeFromQueue( request: FlashrRequest ):Boolean
Removes a given request from the queue.
The FlashrRequest you want to remove.
True if the request was found and removed, false otherwise.
function isEmpty():Boolean
Tells you whether the request queue is empty or not.
True if the queue is empty, false if there is still stuff in it...
function getTopPriority():Number
Tells you the priority of the FlashrRequest which is currently at the front of the queue.
The priority of the FlashrRequest at the front of the queue or undefined if the queue isEmpty
function setPriority( request: FlashrRequest, priority: Number ):Boolean
Sets the priority of the passed FlashrRequest to the passed value if the FlashrRequest is in the queue, otherwise returns false
| request | The FlashrRequest you want to change the priority of. |
| priority | The priority you want to change it to. |
True if the request was in the queue and had it’s priority changes, false otherwise
public static function getInstance():FlashrRequestQueue
Gets a reference to the Singleton instance of this class.
A reference to the one and only FlashrRequestQueue.
Private constructor - there should only be one queue so use getInstance to get it...
private function FlashrRequestQueue()
Gets a reference to the Singleton instance of this class.
public static function getInstance():FlashrRequestQueue
Empties the queue.
function clearQueue()
Get the next FlashrRequest Object to be sent to flickr.com and removes it from the queue.
function getNext():FlashrRequest
Adds a FlashrRequest to the queue.
function addToQueue( request: FlashrRequest, priority: Number )
Removes a given request from the queue.
function removeFromQueue( request: FlashrRequest ):Boolean
Tells you whether the request queue is empty or not.
function isEmpty():Boolean
Tells you the priority of the FlashrRequest which is currently at the front of the queue.
function getTopPriority():Number
Sets the priority of the passed FlashrRequest to the passed value if the FlashrRequest is in the queue, otherwise returns false
function setPriority( request: FlashrRequest, priority: Number ):Boolean
public function toString():String
The FlashrRequestQueue.
function get queue():FlashrRequestQueue
If this request is in the FlashrRequestQueue then sets it’s priority to the passed value.
function setPriority( priority: Number ):Boolean