docs: public VirtualConnection createConnection() throws ChannelException, ChainException {
          OutboundVirtualConnectionImpl vc = new OutboundVirtualConnectionImpl();
          if (getChain().getState() != RuntimeState.STARTED) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Starting outbound chain, " + getName());
              }
              this.cf.startChainInternal(getChain().getChainData());
              // Reset the reference to the new outboundChain.
              this.outboundChain = this.cf.getRunningChain(getName());
              // Handle issues where the refCount may have gone negative due
              // to too many VCF.destroy calls from the same VCF.
              if (getRefCount() <= 0) {
                  this.refCount = 1;
              }
          }
          ConnectionLink[] links = new ConnectionLink[chans.length];
          links[0] = chans[0].getConnectionLink(vc);
          for (int i = 1; i < chans.length; i++) {
              try {
                  links[i] = chans[i].getConnectionLink(vc);
              } catch (Exception e) {
                  FFDCFilter.processException(e, getClass().getName() + ".createConnection", "125", new Object[] { this, chans[i] });
                  // Channel implementation had an error.
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Error getting conn link from " + chans[i].getName() + ", " + e.getMessage());
                  }
                  throw new ChannelException(e.getMessage());
              }
              links[i - 1].setDeviceLink(links[i]);
              links[i].setApplicationCallback(links[i - 1]);
          }
          // do the single cast here instead of many times later
          vc.setConnectionLink((OutboundConnectionLink) links[0]);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Putting name of chain into vc statemap: " + getName());
          }
          // Set the name of the chain into the statemap of the vc.
          // (Currently used on Z in XMEM channel)
          vc.getStateMap().put("ChainName", getName());
  
          return vc;
      }