Options
All
  • Public
  • Public/Protected
  • All
Menu

The interface for the object containing functionality related to queuing AJAX requests. The queue ensures that requests are (a) sent in the order as they were issued, and (b) that each response is processed in the same order as the requests were sent.

Hierarchy

  • Queue

Index

Properties

delays: Record<string, number>

A map between the source ID and the timeout IDs (as returned by setTimeout). Used for AJAX requests with a specified delay (such as remote commands that have a delay set).

requests: Partial<PrimeFaces.ajax.Configuration>[]

A list of requests that are waiting to be sent.

A list of sent AJAX requests, i.e. HTTP requests that were already started. This is used, for example, to abort requests that were sent already when that becomes necessary.

Methods

  • abortAll(): void
  • Aborts all requests that were already sent, but have not yet received an answer from the server. Also removes all requests that are waiting in the queue and have not been sent yet.

    Returns void

  • Adds a newly sent XHR request to the list of sent requests (PrimeFaces.ajax.xhrs).

    Parameters

    Returns void

  • isEmpty(): boolean
  • Checks whether this queue contains any scheduled AJAX requests.

    Returns boolean

    true if this queue contains no scheduled requests, false otherwise.

  • Offers an AJAX request to this queue. The request is sent once all other requests in this queue have been sent. If a delay is set on the request configuration, the request is not sent before the specified delay has elapsed.

    Parameters

    Returns void

  • Returns the request that is scheduled to be sent next, but does not modify the queue in any way.

    Returns null | Partial<PrimeFaces.ajax.Configuration>

    The topmost request in this queue that is to be sent next, or null when this queue is empty.

  • Removes the topmost request (the requests that was just sent) from this queue; and starts the second topmost request.

    Returns null | Partial<PrimeFaces.ajax.Configuration>

    The topmost request in this queue, or null if this queue is empty.

  • Removes an XHR request from the list of sent requests (PrimeFaces.ajax.xhrs). Usually called once the AJAX request is done, having resulted in either a success or an error.

    Parameters

    Returns void

Generated using TypeDoc