nandorsoma commented on code in PR #5990:
URL: https://github.com/apache/nifi/pull/5990#discussion_r872901018


##########
nifi-nar-bundles/nifi-standard-services/nifi-proxy-configuration-api/src/main/java/org/apache/nifi/proxy/SocksVersion.java:
##########
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.proxy;
+
+public enum SocksVersion {
+    NOT_SPECIFIED,

Review Comment:
   TLDR
   The original problem is that the actual proxy client implementation used in 
the processor is loosely coupled from the proxy configuration service. That can 
lead to problems, for example you can choose a `Proxy.Type` in the service 
which won't be supported in the processor. I think this is a known problem, 
that's why as a workaround you can supply the supported `Proxy.Type` to 
`ProxyConfiguration.createProxyConfigPropertyDescriptor()` which will be used 
to generate - unfortunately only - a description. Because of that, in my very 
first solution I wanted to create a new configuration service for such 
processors that supports `SOCKS4` and `SOCKS5`. Meanwhile I learned that it is 
a rule of thumb to have only one proxy configuration service in a flow so I've 
discarded that solution. Though I still felt that it would be misleading to 
specify `SocksVersion` for a processor where the property will be ignored. 
That's why I wanted to explicitly have `NOT_SPECIFIED` to somehow represent this
  intention.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to