Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RequestHandler

Interface which specifies a request handler to receive request notifications.

class

Session.messages.RequestHandler

Hierarchy

  • RequestHandler

Index

Methods

onClose

  • onClose(): void
  • Called when the request handler is unregistered, or the session is closed.

    Returns void

onError

  • onError(error: any): void
  • Notification of a contextual error related to this handler. This is analogous to an Error being thrown. Situations in which onError is called include the session being closed before the handler is registered, a communication timeout, or a problem with the provided parameters. No further calls will be made to this handler.

    Parameters

    • error: any

      the error

    Returns void

onRequest

  • Called to indicate a request has been received.

    function

    Session.messages.RequestHandler.onRequest

    Parameters

    • request: any

      The request that was received

    • context: RequestContext

      Context object that provides the session id (session that sent the request), path and session properties

    • responder: Responder

      The responder to dispatch a response back to the requester

    Returns void