Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ClientControl

Hierarchy

  • ClientControl

Index

Properties

SessionEventType

SessionEventType: SessionEventType

Methods

addSessionEventListener

  • Parameters

    Returns Promise<Registration>

    a Promise that completes when the listener has been registered, returning a Registration which can be used to unregister the listener.

    Otherwise, an error will be returned. Common reasons for failure include:

    • the session is closed;
    • the session filter specified in the parameters was invalid;
    • the session does not have REGISTER_HANDLER and VIEW_SESSION permissions.

changeRoles

  • changeRoles(sessions: SessionId | string, rolesToRemove: string[] | Set<string>, rolesToAdd: string[] | Set<string>): Result<number>
  • Parameters

    • sessions: SessionId | string
    • rolesToRemove: string[] | Set<string>
    • rolesToAdd: string[] | Set<string>

    Returns Result<number>

    a Result that resolves when session roles have been changed.

    If successful, the result resolves with an integer value which represents a number of sessions that have matched the filter and for which the specified role changes have been applied.

    Otherwise, the Result fails with an Error. Common reasons for failure include:

    • the calling session does not have MODIFY_SESSION and VIEW_SESSION permission;
    • a SessionId was supplied and there is no session with the given sessionId;
    • a filter string was supplied that could not be parsed
    • the calling session is closed.
    • IllegalArgumentError – if both rolesToRemove and rolesToAdd are empty sets.
    • NullValueError – if sessions null or undefined

close

  • close(sessions: string | SessionId): Result<number>
  • Parameters

    • sessions: string | SessionId

    Returns Result<number>

    a Result that resolves to the number of affected sessions

    If unsuccessful, the promise will be rejected. Common reasons for failure include:

getSessionProperties

  • Parameters

    • session: string | SessionId
    • Optional properties: string[]

    Returns Result<SessionProperties>

    a Result for this operation

    If unsuccessful, the promise will be rejected. Common reasons for failure include:

setConflated

  • setConflated(sessions: SessionId | string, conflated: boolean): Result<number>
  • Parameters

    • sessions: SessionId | string
    • conflated: boolean

    Returns Result<number>

    a Result that resolves to the number of affected sessions

    If the conflation policy was updated for the identified session, the Result will resolve successfully.

    Otherwise, the Result fails with an Error. Common reasons for failure include:

    • the identified session was closed before the response was delivered;
    • the calling session does not have MODIFY_SESSION and VIEW_SESSION permissions;
    • the calling session is closed.
    • NullValueError – if sessions is null or undefined

setSessionProperties

  • Parameters

    • session: string | SessionId
    • properties: SessionProperties | Map<string, string | null>

    Returns Result<SessionProperties>

    a Result for this operation. If the session properties were updated, the result type is a map of properties that changed with their previous values. If no properties were changed, the map will be empty. If any new properties were added, the values in the map will be null to indicate that they do not have an old value.

    Otherwise, an error will be returned. Common reasons for failure include:

setSessionPropertiesByFilter

  • setSessionPropertiesByFilter(filter: string, properties: SessionProperties | Map<string, string | null>): Result<number>
  • Parameters

    Returns Result<number>

    a Result that resolves when session properties have been changed.

    If successful, the result resolves with an integer value which represents a number of sessions that have matched the filter and for which the specified properties changes have been applied.

    The operation can fail, common reasons for failure include:

setSessionPropertiesListener

subscribe

  • Parameters

    Returns Result<number | void>

    a Result for this operation. If subscribing with a session filter, the success callback will be given the number of sessions selected by the filter.

    If unsuccessful, the promise will be rejected. Common reasons for failure include:

unsubscribe

  • Parameters

    Returns Result<number | void>

    a Result for this operation. If unsubscribing with a session filter, the success callback will be given the number of sessions selected by the filter

    If unsuccessful, the promise will be rejected. Common reasons for failure include: