Connecting to the Communication Channel
Monitor
The communication channel monitor allows system administrators to call information about communication channels and to administrate them.
The 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 |
J2EE service |
Technical Name |
com.sap.aii.af.service.administration.api |
Certification |
Optional |
Syntax |
com.sap.aii.af.service.administration.api |
● 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.
In the PCK, you call the monitor using the link on the PCK start page.
For information about using the communication channel monitor, see also: Communication Channel Monitor.
● You can also call the communication channel monitor at //localhost:50000/AdapterFramework/admin/channelstatus.jsp
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-based 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
First, you must 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.
You can now 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 may be the case 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.

Open SPIManagedConnectionFactory.java and search for the character strings CS_ADMONR and CS_ADMOND.
Under CS_ADMONR, the registration of the adapter with the AAM framework is displayed.
Under CS_ADMOND, the deregistration of the adapter with the AAM framework is displayed.
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 ChannelStatuscontainer 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.

Open XIConfiguration.java and search for the character string CS_ADMON.
Under CS_ADMON, there is a description of how to determine the channel status.
○ 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.
For receiver channels, you do not have to write the processing started and processing stopped events explicitly. The events are written automatically by the Adapter Framework listener bean.
● 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.
The AAM framework supports the LocalizationCallbackinterface. 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.

The callback is not called for text information from ChannelStatusCallback.
Open XIConfiguration.java and search for the character string CS_LOCAL.
A general LocalizationCallback implementation is provided with the ResourceBundleLocalizationCallback class.
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. The configuration of the alert rules takes
place in the alert framework, see also:
Alert
Configuration.
Note

For an example sender adapter, you can set the Raise Error Condition (demo) parameter to Raise Rollback .... This triggers an error in sender message processing. In addition, a FATAL process status is reported to the AAM framework.
Open SPIManagedConnectionFactory.java and search for the character string CS_PROALERT.