Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

The OpenNMS client. This is the primary interface to OpenNMS servers.

Hierarchy

  • Client

Implements

Index

Constructors

constructor

  • Construct a new OpenNMS client.

    constructor

    Parameters

    • Optional httpImpl: IOnmsHTTP

      The OnmsHTTP implementation to use. Normally this will automatically choose the best implementation based on the environment.

    Returns Client

Properties

http

http: IOnmsHTTP

the OnmsHTTP implementation that will be used when making requests

server

server: OnmsServer

The remote server to connect to

Static Private defaultHttp

defaultHttp: IOnmsHTTP

The default OnmsHTTP implementation to be used when making requests

Methods

alarms

connect

  • connect(name: string, url: string, username: string, password: string, timeout?: number): Promise<this>
  • Connect to an OpenNMS server, check what capabilities it has, and return an OnmsServer for that connection.

    Parameters

    • name: string
    • url: string
    • username: string
    • password: string
    • Optional timeout: number

    Returns Promise<this>

events

nodes

Static checkServer

  • Given an OnmsServer object, check that it can be connected to.

    Parameters

    • server: OnmsServer

      the server to check

    • Optional httpImpl: IOnmsHTTP

      the IOnmsHTTP implementation to use

    • Optional timeout: number

      how long to wait before giving up when making ReST calls

    Returns Promise<boolean>

Static getMetadata

  • Given an OnmsServer object, query what capabilities it has, and return the capabilities associated with that server.

    Parameters

    • server: OnmsServer

      the server to check

    • Optional httpImpl: IOnmsHTTP

      the IOnmsHTTP implementation to use

    • Optional timeout: number

      how long to wait before giving up when making ReST calls

    Returns Promise<ServerMetadata>

Generated using TypeDoc