Skip to Content
Former Member
Jun 02, 2015 at 10:23 AM

retrieve communication channel status programmatically


Dear community,

I would like to retrieve detailed runtime status informations of communication channels running on our SAP Netweaver 7.31SP10 java single stack server!

What I have already considered:

  1. Directory API 7.31 (Using PI 7.3’s Directory API)
    • insufficiency: i can retrieve the adapterspecific attribute named "adapterstatus" but it only returns active or <empty>, but no informations as seen in the NWA->SOA->Monitoring->Communication Channel Monitor. Did I miss something?
  2. Communication channel monitor (SAP NetWeaver Process Integration - SAP Library)
    • source code:
      public class StatusCallback implements ChannelStatusCallback {
        try {
            CPAFactory cf = CPAFactory.getInstance();
            this.lookupManager = cf.getLookupManager();
        } catch (Exception e) {
        AdapterRegistry adapterReg = null;
        AdapterRegistryFactory adapterRegFac = AdapterRegistryFactory.getInstance();
        adapterReg = adapterRegFac.getAdapterRegistry();
                                                            new AdapterCapability[] { AdapterCapability.PUSH_PROCESS_STATUS },
                                                            new AdapterCallback[] { this });
        synchronized (this) {
            this.inboundChannels = new LinkedList<Channel>();
            this.outboundChannels = new LinkedList<Channel>();
            try {
              List<Channel> allChannels = this.lookupManager.getAllCPAObjects(CPAObjectType.CHANNEL);
              //Here comes my question:
              //the following lines create a new ChannelStaus BUT how can i retrieve the status of a specific channel without callbacks or anything
              ChannelStatusFactory chStatFac = ChannelStatusFactory.getInstance();
              chStatFac.createChannelStatus(allChannels.get(i),ChannelState.OK, "State test!");
        <unregister adapter>
      My question can be found in the source code. I want to retrieve the current runtime status without any callbacks just by calling a method! Is this possible, if yes can you provide me some pseudocode or a brief explanation!

I would appreciate any help! The developed tool is only missing out this part!

Thank you in advance!