Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to connect UI Queue web socket

Hierarchy

  • UIQueueWsProvider

Index

Constructors

  • constructor which sets agent session instance

    example
    UIQueueWsProvider();
    

    Returns UIQueueWsProvider

Properties

adminService: AdminService
agentSession: ACDSessionManager
baseUri: string = ''
getNextEventAdapter: CXoneGetNextAdapter = ...
getkeepAlivePollingisActive: boolean = false
hearbeatPoller: any
hubConnection: HubConnection
hubUrl: string = ''
isUIQueueDegraded: boolean = false
keepAlivePollingWorker: any
loader: LoadWorker = ...
logger: Logger = ...
receivedEvents: any = []
utilService: HttpUtilService = ...

Accessors

  • The static method that controls the access to the singleton instance.

    example
    const uiQueueWsProvider = UIQueueWsProvider.instance();
    

    Returns UIQueueWsProvider

Methods

  • addEventListeners(userInfo: UserInfo): void
  • Method to add event listeners

    example
    addEventListeners(userInfo)
    

    Parameters

    Returns void

  • connectAgent(userInfo: UserInfo, invokeSnapshot?: boolean): void
  • Method to establish connection

    example
    connectAgent(userInfo, invokeSnapshot)
    

    Parameters

    • userInfo: UserInfo

      user info object

    • Optional invokeSnapshot: boolean

      flag to invoke snapshot request

    Returns void

  • disconnectConsumerAgent(): void
  • Method to disconnectAgent

    example
    disconnectConsumerAgent()
    

    Returns void

  • establishSocketConnection(userInfo: UserInfo, invokeSnapshot?: boolean): Promise<void>
  • Method to establish connection

    example
    establishSocketConnection(userInfo, invokeSnapshot)
    

    Parameters

    • userInfo: UserInfo

      user info object

    • invokeSnapshot: boolean = false

      flag to invoke snapshot request

    Returns Promise<void>

  • getInitialGetNextEvent(sessionId?: string): Promise<void>
  • Method to call the get-next API once (in order to flush the initial renew-state event from the agent state)

    example
    getInitialGetNextEvent('12345');
    

    Parameters

    • Optional sessionId: string

      sessionid

    Returns Promise<void>

    Promise that resolves when the API call is successful

  • handleReceivedEvents(events: {}): void
  • Method to add event listeners

    example
    handleReceivedEvents(events)
    

    Parameters

    • events: {}

      recieved events

      • [key: string]: string

    Returns void

  • initAgentKeepAliveWorker(): void
  • Use to initializing the user slot worker and will return the method inside the worker

    example
    this.initAgentKeepAliveWorker();
    

    Returns void

  • invokeUIQEventSnapshotRequest(): void
  • Method to invoke snapshot request

    example
    invokeUIQEventSnapshotRequest()
    

    Returns void

  • keepAlivePolling(sessionId?: string): void
  • Calls keepalive api on worker thread

    example
    this.getNextEvents(retryOptions, '12345');
    

    Parameters

    • Optional sessionId: string

      sessionid

    Returns void

  • restartWorker(): void
  • Use to restart worker

    example
    this.restartWorker();
    

    Returns void

  • sendRefreshToken(): void
  • Method to invoke snapshot request

    example
    sendRefreshToken()
    

    Returns void

  • startConnection(userInfo: UserInfo): Promise<void>
  • Method to start connection

    example
    startConnection(userInfo)
    

    Parameters

    • userInfo: UserInfo

      current logged in user information

    Returns Promise<void>

  • startKeepAlivePolling(sessionId?: string): void
  • Starts KeepAlivePolling for specified agent session

    example
    this.startKeepAlivePolling();
    

    Parameters

    • Optional sessionId: string

      sessionid

    Returns void

  • startSocketHeartBeat(agentId: string, tenantId: string): void
  • Method to send heartbeat

    example
    startSocketHeartBeat(agentId, tenantId)
    

    Parameters

    • agentId: string

      Agent ID

    • tenantId: string

      tenant ID

    Returns void

  • terminatePolling(ifRestart?: boolean): void
  • Used to terminate the polling of get-next api

    example
    this.terminatePolling();
    

    Parameters

    • Optional ifRestart: boolean

    Returns void

Generated using TypeDoc