code: public static ConnectionType getVCConnectionType(VirtualConnection vc) {
          if (vc == null) {
              return null;
          }
          return (ConnectionType) vc.getStateMap().get(CONNECTION_TYPE_VC_KEY);
      }
docs: Get the connection type from the virtual connection.
  
  @param vc
  @return ConnectionType