Strophe.js
    Preparing search index...

    Class default

    Private helper class for managing timed handlers.

    A Strophe.TimedHandler encapsulates a user provided callback that should be called after a certain period of time or at regular intervals. The return value of the callback determines whether the Strophe.TimedHandler will continue to fire.

    Users will not use Strophe.TimedHandler objects directly, but instead they will use Strophe.Connection#addTimedHandler|addTimedHandler() and Strophe.Connection#deleteTimedHandler|deleteTimedHandler().

    Strophe

    Index
    • Create and initialize a new Strophe.TimedHandler object.

      Parameters

      • period: number

        The number of milliseconds to wait before the handler is called.

      • handler: () => boolean

        The callback to run when the handler fires. This function should take no arguments.

      Returns default

    handler: () => boolean
    lastCalled: number
    period: number
    user: boolean
    • Reset the last called time for the Strophe.TimedHandler.

      Returns void

    • Run the callback for the Strophe.TimedHandler.

      Returns boolean

      Returns the result of running the handler, which is true if the Strophe.TimedHandler should be called again, and false otherwise.

    • Get a string representation of the Strophe.TimedHandler object.

      Returns string