Connecting to the Communication Channel Monitor

Use

The communication channel monitor allows a system administrator to call information about communication channels and to administrate them.

This monitor provides current runtime information about the adapters of a communication channel. It also provides a connection to alerting.

Interface Overview

Characteristic Value

Name

Adapter Administration and Monitoring (AAM)

Purpose

Queries the communication channel status, administration of channels (start, stop)

Connection to the Alert Framework

Type

Service in the facade com.sap.aii.af.svc.facade

Technical Name

com.sap.aii.af.service.administration.api, com.sap.aii.af.service.administration.api.i18n, com.sap.aii.af.service.administration.api.monitoring

Certification

Mandatory

Syntax

Javadoc package com.sap.aii.af.service.administration.api and subpackages

Integration

  • You start the communication channel monitor in the Runtime Workbench in Component Monitoring.
    • Select an Adapter Engine.
    • On the Status tab page, choose Communication Channel Monitoring.

    More information: Communication Channel Monitor

  • Or use the communication channel monitor in the local SAP NetWeaver Administrator.

    More information: Monitoring Communication Channels

Features

The APIs for communication channel monitoring are located in the hierarchy under the Adapter Framework service package com.sap.aii.af.service.administration.api.

  • Registration and Callback Interfaces:

    com.sap.aii.af.service.administration.api

  • Channel-related interfaces and APIs:

    com.sap.aii.af.service.administration.api.cpa

  • Monitoring interfaces and APIs:

    com.sap.aii.af.service.administration.api.monitoring

  • Localization interfaces and APIs:

    com.sap.aii.af.service.administration.api.i18n

Activities

Registering/Deregistering Adapters

  • Register your adapter with the Adapter Framework core service.

    To do this, use the method AdapterRegistry.registerAdapter(String, String, AdapterCapability[], AdapterCallback[]).

    An adapter is identified uniquely by its name and namespace. Enter these two values as the first two parameters in the method call.

    For the example adapter, the adapter name is JCA and the namespace is http://sap.com/xi/XI/sample.

    With incompatible adapter changes select another namespace for the adapter. The adapter should then register itself for all communication channels.

  • Specify the adapter capabilities:
    Adapter Capability Description

    AdapterCapability.NONE

    No particular capabilities are supported.

    AdapterCapability.PUSH_CHANNEL_STATUS

    This allows the adapter to forward information about the status of the communication channel to the AAM framework (see below under Push mechanism).

    AdapterCapability.PUSH_PROCESS_STATUS

    This allows the adapter to forward process status information to the AAM framework (see below under Process status).

    Process status information can trigger SAP alerts (see below).

  • The AdapterCallback parameter transfers the classes that implement the AAM callback interfaces to the AAM framework.

    In the case of the example adapter, XIConfiguration implements the following interfaces:

    • ChannelLifecycleCallback
    • ChannelStatusCallback
    • LocalizationCallback

    However, it is possible that these interfaces are implemented by different classes, which are then transferred by the AdapterCallback parameter.

  • Make sure that you call the method unregisterAdapter(String, String) once the adapter has been terminated.

Monitoring

In the communication channel monitor, you can monitor two types of status: the channel status and the process status.

  • The channel status displays whether a channel has started and is processing messages successfully, whether it has encountered a configuration error, or whether it has stopped.

    To determine the channel status, the AAM framework provides a polling and a push mechanism.

    • Polling mechanism

      Implement the ChannelStatusCallback interface so that the AAM framework calls a callback as soon as a user wants to get status information about a channel in communication channel monitoring.

      The getChannelStatus method is then called. The AAM framework expects the ChannelStatus container to be filled with status information. Use the ChannelStatusFactory to get an instance of this class.

      Use the registerAdapter API to register the ChannelStatusCallback implementation with the AAM framework.

    • Push mechanism

      The adapter provides the AAM framework with status information during runtime. The AAM framework supports this mechanism with the reportChannelStatus methods of the MonitoringManager.

      To get an instance, use MonitoringManagerFactory.

    The process status is reported to the AAM framework exclusively by the reportProcessStatus methods of the MonitoringManager interface.

    The channel status corresponds to the Status column in the communication monitor. The process status is displayed in the Processing Errors column.

Localization

The AAM framework supports the LocalizationCallback interface. When an adapter registers an instance of this interface with the AAM framework, this callback is called for each string provided to the AAM framework, before it is displayed to the user.

A general LocalizationCallback implementation is provided with the ResourceBundleLocalizationCallback class.

Connecting to the Alert Framework

The AAM framework offers an option to trigger alerts, which, for example, send SMS messages to an administrator. To do this, the adapter must report an error with the value FATAL for the process status.

This happens by way of the reportProcessStatus() call. The adapter must specify that it supports the process status at registration using AdapterCapability.PUSH_PROCESS_STATUS. You configure alert rules in the Alert Framework.