OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.comm
Class AdfRestRequestQueueManager

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.comm.AdfRestRequestQueueManager

public class AdfRestRequestQueueManager
extends AdfObject
Manages two queues based on the priority state. The queue objects function as priority queue holding the incoming request items to make GET calls to a URL. The request items are pulled out of the request queue by AdfXhrPoolManager.


Field Summary

private Object
_priorityRequestQueue
private Object
_regularRequestQueue

Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass

Fields inherited from org.ecmascript.object.Object

prototype

Constructor Summary

public
AdfRestRequestQueueManager()
Manages two queues based on the priority state.

Method Summary

private static Object
_cloneSimpleObject(Object object)
private Object
_constructAndQueueRequest(Object actionURL, Object options, Object isPrioritized)
private static Object
_deQueueDeadRequests(Object queue)
private static Object
_findMatchingOutstandingRequest(Object queue, Object actionURL, Object requestData)
Locates and returns the identical request object in the queue, if one exists
public Object
first()
Returns an outstanding request from the priority queue.
public static Object
getClientIdList(Object dispatchRequest)
Returns an array of clientId of the components making this REST r
private Object
_getMatchingOutstandingRequest(Object actionURL, Object requestData)
Returns the identical request object in the wait queue that is not yet processed, if one exists
public Object
hasOutstandingPriorityRequests()
Returns true if the priority queue has outstanding requests
protected Object
Init()
Initializes the instance.
protected static Object
InitClass()
public static Object
markDead(Object request)
Marks the passed request item object as dead
private static Object
_peekNextOutstandingRequest(Object queue)
Locates the first item to be processed from the request queue.
public Object
push(Object actionURL, Object options)
Updates either the priority request queue or the regular request queue.
public Object
registerRequestQueuedListener(Object callback)
Registers the listener that is to be invoked when a new item is added to the request queue
public Object
shift()
Returns an outstanding request from the priority queue.
private static Object
_shiftNextOutstandingRequest(Object queue)
Locates the next item to be processed from the request queue.
private Object
_upgradeRequest(Object request)

Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString

Field Detail


_priorityRequestQueue

private Object _priorityRequestQueue

_regularRequestQueue

private Object _regularRequestQueue

Constructor Detail


AdfRestRequestQueueManager

public AdfRestRequestQueueManager()

Manages two queues based on the priority state. The queue objects function as priority queue holding the incoming request items to make GET calls to a URL. The request items are pulled out of the request queue by AdfXhrPoolManager.

Method Detail


_cloneSimpleObject

private static Object _cloneSimpleObject(Object object)

Parameters:
object  
Return:
Object

_constructAndQueueRequest

private Object _constructAndQueueRequest(Object actionURL,
                                         Object options,
                                         Object isPrioritized)

Parameters:
actionURL  
options  
isPrioritized  
Return:
Object

_deQueueDeadRequests

private static Object _deQueueDeadRequests(Object queue)

Parameters:
queue  
Return:
Object

_findMatchingOutstandingRequest

private static Object _findMatchingOutstandingRequest(Object queue,
                                                      Object actionURL,
                                                      Object requestData)

Locates and returns the identical request object in the queue, if one exists

Parameters:
queue  
actionURL  
requestData  
Return:
Object - The request object

first

public Object first()

Returns an outstanding request from the priority queue. If priority queue is empty, an outstanding request from the regular queue is returned. If the regular queue is empty too, the method returns undefined. The outstanding request returned is NOT removed from the queue.

Return:
Object

getClientIdList

public static Object getClientIdList(Object dispatchRequest)

Returns an array of clientId of the components making this REST r

Parameters:
dispatchRequest  
Return:
Object

_getMatchingOutstandingRequest

private Object _getMatchingOutstandingRequest(Object actionURL,
                                              Object requestData)

Returns the identical request object in the wait queue that is not yet processed, if one exists

Parameters:
actionURL  
requestData  
Return:
Object - The request object

hasOutstandingPriorityRequests

public Object hasOutstandingPriorityRequests()

Returns true if the priority queue has outstanding requests

Return:
Object

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

markDead

public static Object markDead(Object request)

Marks the passed request item object as dead

Parameters:
request  
Return:
Object

_peekNextOutstandingRequest

private static Object _peekNextOutstandingRequest(Object queue)

Locates the first item to be processed from the request queue. The located item is NOT removed from the requeue

Parameters:
queue  
Return:
Object - Request object

push

public Object push(Object actionURL,
                   Object options)

Updates either the priority request queue or the regular request queue. If a similar request already exists in the queue, the existing request object is updated and it is moved to the priority queue if required. A new request is created otherwise and is pushed to the appropriate queue.

Parameters:
actionURL  
options  
Return:
Object

registerRequestQueuedListener

public Object registerRequestQueuedListener(Object callback)

Registers the listener that is to be invoked when a new item is added to the request queue

Parameters:
callback  
Return:
Object

shift

public Object shift()

Returns an outstanding request from the priority queue. If priority queue is empty, an outstanding request from the regular queue is returned. If the regular queue is empty too, the method returns undefined. The outstanding request returned is removed from the queue.

Return:
Object

_shiftNextOutstandingRequest

private static Object _shiftNextOutstandingRequest(Object queue)

Locates the next item to be processed from the request queue. The located item is removed and queue and returned from this method.

Parameters:
queue  
Return:
Object - Request object

_upgradeRequest

private Object _upgradeRequest(Object request)

Parameters:
request  
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.