code: public synchronized RuntimeState getChannelState(String channelName, Chain chain) {
          RuntimeState state = null;
          Channel channel = getRunningChannel(channelName, chain);
          if (channel != null) {
              ChannelContainer channelContainer = this.channelRunningMap.get(channel.getName());
              if (null != channelContainer) {
                  state = channelContainer.getState();
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "getChannelState: " + channelName + "=" + state);
          }
          return state;
      }
docs: Return the state of the input runtime channel.
  
  @param channelName
  @param chain
  that includes this channel
  @return state of channel, or -1 if the channel cannot be found.