kevdoran commented on code in PR #10531:
URL: https://github.com/apache/nifi/pull/10531#discussion_r2530071807


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenSyslog.java:
##########
@@ -94,7 +99,29 @@
                     @WritesAttribute(attribute = "syslog.port", description = 
"The port over which the Syslog message was received."),
                     @WritesAttribute(attribute = "mime.type", description = 
"The mime.type of the FlowFile which will be text/plain for Syslog messages.")})
 @SeeAlso({PutSyslog.class, ParseSyslog.class})
-public class ListenSyslog extends AbstractSyslogProcessor {
+public class ListenSyslog extends AbstractSyslogProcessor implements 
ListenComponent {
+
+    // See migrateProperties() below for how legacy properties are handled on 
upgrade
+    private static final String LEGACY_PORT_PROPERTY_NAME = "Port";
+    private static final String LEGACY_PROTOCOL_PROPERTY_NAME = "Protocol";
+
+    public static final PropertyDescriptor TCP_PORT = new PropertyDescriptor
+        .Builder().name("TCP Port")
+        .description("The port to listen on for TCP Syslog communication. 
Either this or UDP Port must be set, but both cannot be set at the same time.")
+        .required(false)
+        .addValidator(StandardValidators.PORT_VALIDATOR)
+        
.identifiesListenPort(org.apache.nifi.components.listen.TransportProtocol.TCP, 
"syslog")
+        .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
+        .build();
+
+    public static final PropertyDescriptor UDP_PORT = new PropertyDescriptor
+        .Builder().name("UDP Port")
+        .description("The port to listen on for UDP Syslog communication. 
Either this or TCP Port must be set, but both cannot be set at the same time.")
+        .required(false)
+        .addValidator(StandardValidators.PORT_VALIDATOR)
+        
.identifiesListenPort(org.apache.nifi.components.listen.TransportProtocol.TCP, 
"udp")

Review Comment:
   Good catch! that was a copy/paste error



-- 
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