Options
All
  • Public
  • Public/Protected
  • All
Menu

Configuration used to create a connection to a device via the Clover cloud.

Hierarchy

  • WebSocketCloverDeviceConfiguration
    • WebSocketCloudCloverDeviceConfiguration

Implements

  • CloverDeviceConfiguration

Index

Constructors

constructor

  • new WebSocketCloudCloverDeviceConfiguration(applicationId: string, webSocketFactoryFunction: any, imageUtil: IImageUtil, cloverServer: string, accessToken: string, httpSupport: HttpSupport, merchantId: string, deviceId: string, friendlyId: string, forceConnect?: boolean, heartbeatInterval?: number, reconnectDelay?: number, heartbeatDisconnectTimeout?: number): WebSocketCloudCloverDeviceConfiguration
  • Parameters

    • applicationId: string

      the applicationId that uniquely identifies the POS. e.g. com.company.MyPOS:2.3.1 for the first connection

    • webSocketFactoryFunction: any

      the function that will return an instance of the CloverWebSocketInterface that will be used when connecting. For Browser implementations, this can be BrowserWebSocketImpl.createInstance. For NodeJS implementations, this will be defined differently.

    • imageUtil: IImageUtil

      utility to translate images into base64 strings.

    • cloverServer: string

      the base url for the clover server used in the cloud connection. EX: https://www.clover.com, http://localhost:9000

    • accessToken: string

      the OAuth access token that will be used when contacting the clover server

    • httpSupport: HttpSupport

      the helper object used when making http requests.

    • merchantId: string

      the merchant the device belongs to.

    • deviceId: string

      the id (not uuid) of the device to connect to

    • friendlyId: string

      an identifier for the specific terminal connected to this device. This id is used in debugging and may be sent to other clients if they attempt to connect to the same device. It will also be sent to other clients that are currently connected if this device does a forceConnect.

    • Default value forceConnect: boolean = false

      if true, overtake any existing connection.

    • Optional heartbeatInterval: number
    • Optional reconnectDelay: number
    • Optional heartbeatDisconnectTimeout: number

    Returns WebSocketCloudCloverDeviceConfiguration

Properties

Private accessToken

accessToken: string

Private cloverServer

cloverServer: string

Private deviceId

deviceId: string

Private forceConnect

forceConnect: boolean

Private friendlyId

friendlyId: string

Protected heartbeatDisconnectTimeout

heartbeatDisconnectTimeout: number = 3000

Protected heartbeatInterval

heartbeatInterval: number = WebSocketCloverDeviceConfiguration.DEFAULT_HEARTBEAT_INTERVAL

Private httpSupport

httpSupport: HttpSupport

Protected imageUtil

imageUtil: IImageUtil

Protected logger

logger: Logger = Logger.create()

maxCharInMessage

maxCharInMessage: number = 50000

Private merchantId

merchantId: string

protected

protected: number = 4

Protected reconnectDelay

reconnectDelay: number = WebSocketCloverDeviceConfiguration.DEFAULT_RECONNECT_DELAY

Protected webSocketImplClass

webSocketImplClass: any

Static Protected MINIMUM_ALLOWED_HEARTBEAT_INTERVAL

MINIMUM_ALLOWED_HEARTBEAT_INTERVAL: number = 2500

Methods

getApplicationId

  • getApplicationId(): string

getCloverDeviceType

  • getCloverDeviceType(): any

getCloverTransport

  • getCloverTransport(): CloverTransport

getHeartbeatDisconnectTimeout

  • getHeartbeatDisconnectTimeout(): number

getHeartbeatInterval

  • getHeartbeatInterval(): number

getImageUtil

getMaxMessageCharacters

  • getMaxMessageCharacters(): number

getMessagePackageName

  • getMessagePackageName(): string

getName

  • getName(): string

getReconnectDelay

  • getReconnectDelay(): number

setHeartbeatDisconnectTimeout

  • setHeartbeatDisconnectTimeout(heartbeatDisconnectTimeout: number): void

setHeartbeatInterval

  • setHeartbeatInterval(heartbeatInterval: number): void

setReconnectDelay

  • setReconnectDelay(reconnectDelay: number): void

Generated using TypeDoc