Maximo API Client - v0.9.20
    Preparing search index...

    Class ClusterService

    Service that discovers cluster topology and locates user sessions across JVMs.

    Discovery uses a layered strategy:

    1. /mmi/members for node enumeration — always preferred; native and requires no script install.
    2. MXAPIMAXSESSION over OSLC for user-session lookup, when the object structure is exposed on the deployment.
    3. The MAXIMOMIZE.CLUSTER autoscript as a fallback for both, used when MXAPIMAXSESSION is not exposed.

    Pinning a client to a chosen node is performed by MaximoClient.pinTo(), not by this service; this layer is purely informational.

    Hierarchy

    • BaseMaximoService
      • ClusterService
    Index

    Properties

    apiBase: string

    API base path (e.g., '/maximo/api')

    logger: ILogger
    httpClient: HttpClient

    The HTTP client for making requests

    Methods

    • Overrides the logger used by this service instance.

      Parameters

      Returns this

    • Returns the current logger used by this service instance.

      Returns ILogger

    • Parameters

      • Optionalproperties: string | string[]

      Returns string | undefined

    • Error handler

      Parameters

      • error: any

        the error to process

      Returns never

    • Returns the JVM that answered this call, as reported by /mmi/members/thisserver. Useful for verifying that a pinned client actually landed on the requested node.

      Returns Promise<MaximoHere & { memberId?: string }>

    • Enumerates every member of the cluster.

      Primary source is /mmi/members. If opts.userId is supplied and the autoscript is installed, the call is augmented so each entry carries a userActive flag.

      Parameters

      • opts: { userId?: string } = {}

      Returns Promise<MaximoJvm[]>

    • Returns the first JVM that holds an HttpSession for the given user, or null if none currently do. Use findUserJvms for the multi-session variant (a user can be logged into more than one JVM).

      Parameters

      • userId: string

      Returns Promise<MaximoJvm | null>

    • Returns every JVM that currently holds an HttpSession for userId.

      Parameters

      • userId: string

      Returns Promise<MaximoJvm[]>

    • Returns version + node info from the script's ?action=ping endpoint, or null if the script is not installed.

      ping does no Mbo or DNS work, so this is the canonical cheap probe. Result is memoised for the lifetime of the service instance.

      Forward compatibility: if ping returns 400 (Unknown action) the script is installed but predates the ping handler. We fall back to a ?action=nodes probe to confirm presence and return a versionKnown: false placeholder.

      Returns Promise<ClusterScriptInfo | null>

    • Probe whether the MAXIMOMIZE.CLUSTER autoscript is installed on the deployment. Cheap (one ?action=ping round-trip, no Mbo work) and memoised. Equivalent to (await getScriptInfo()) !== null.

      Returns Promise<boolean>

    • Resolve a user-supplied identifier (nodeName, serverHost, or jvmTag) to a concrete MaximoJvm entry. Throws ClusterError.UnknownNode if no entry matches.

      Parameters

      • identifier: string

      Returns Promise<MaximoJvm>

    Common Resource Operations

    • Executes an action on an arbitrary endpoint Useful for service endpoints that don't follow the standard resource/ID pattern Supports both GET and POST methods based on payload presence

      Parameters

      • endpoint: string

        The endpoint to call the action on (e.g., 'service/logging')

      • actionName: string

        The name of the action to execute (e.g., 'wsmethod:streamLog')

      • Optionalpayload: any

        Optional payload data for the action (if provided, uses POST, otherwise GET)

      • OptionalreturnProperties: string | string[]

        Optional properties to return in the response

      Returns Promise<ResourceUpdateResponse<any>>

      A promise resolving to a response object containing success status and optional data

    Constructors