-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NIFI-15156 Add support for discovering Listen Ports #10476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
exceptionfactory
merged 8 commits into
apache:main
from
kevdoran:NIFI-15156-listen-ports
Nov 14, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e990722
NIFI-15156 Add ListenPortDefinitions to component manifests and flow …
kevdoran ab5754f
NIFI-15156 Add REST API endpoint for discovering Listen Ports
kevdoran b1bc469
NIFI-15156 Connect Listen Ports REST API endpoint to framework
kevdoran 3f11fa1
NIFI-15156 Update ListenHTTP to be a ListenComponent with a ListenPort
kevdoran 5734c2d
NIFI-15156 Add property name to listen port
kevdoran 28bdb9d
Rename propertyName to portName
kevdoran 36ad4ad
Cleanup and Remove TODOs that will be addressed in follow up work
kevdoran 3721802
Address peer review feedback
kevdoran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...src/main/java/org/apache/nifi/c2/protocol/component/api/PropertyListenPortDefinition.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * 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.c2.protocol.component.api; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| public class PropertyListenPortDefinition implements Serializable { | ||
| private static final long serialVersionUID = 1L; | ||
|
|
||
| private TransportProtocol transportProtocol; | ||
| private List<String> applicationProtocols; | ||
|
|
||
| @Schema(description = "The transport protocol used by this listen port") | ||
| public TransportProtocol getTransportProtocol() { | ||
| return transportProtocol; | ||
| } | ||
|
|
||
| public void setTransportProtocol(final TransportProtocol transportProtocol) { | ||
| this.transportProtocol = transportProtocol; | ||
| } | ||
|
|
||
| @Schema(description = "The application protocols that this listen port could support (if any)") | ||
| public List<String> getApplicationProtocols() { | ||
| return applicationProtocols; | ||
| } | ||
|
|
||
| public void setApplicationProtocols(final List<String> applicationProtocols) { | ||
| this.applicationProtocols = applicationProtocols; | ||
| } | ||
|
|
||
| public enum TransportProtocol { | ||
| TCP, | ||
| UDP | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
...fi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ListenPortDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| /* | ||
| * 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.web.api.dto; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.xml.bind.annotation.XmlType; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @XmlType(name = "listenPort") | ||
| public class ListenPortDTO { | ||
|
|
||
| // Port definition | ||
| private String portName; | ||
| private int portNumber; | ||
| private String transportProtocol; | ||
| private List<String> applicationProtocols; | ||
|
|
||
| // Contextual information about the component providing the port, and the PG containing the component | ||
| private String componentType; | ||
| private String componentId; | ||
| private String componentName; | ||
| private String componentClass; | ||
| private String parentGroupId; | ||
| private String parentGroupName; | ||
|
|
||
| @Schema(description = "The name of the the listen port. Useful context for components that provide multiple ports.") | ||
| public String getPortName() { | ||
| return portName; | ||
| } | ||
|
|
||
| public void setPortName(final String portName) { | ||
| this.portName = portName; | ||
| } | ||
|
|
||
| @Schema(description = "The ingress port number") | ||
| public int getPortNumber() { | ||
| return portNumber; | ||
| } | ||
|
|
||
| public void setPortNumber(final int portNumber) { | ||
| this.portNumber = portNumber; | ||
| } | ||
|
|
||
| @Schema(description = "The ingress transport protocol (TCP or UDP)") | ||
| public String getTransportProtocol() { | ||
| return transportProtocol; | ||
| } | ||
|
|
||
| public void setTransportProtocol(final String transportProtocol) { | ||
| this.transportProtocol = transportProtocol; | ||
| } | ||
|
|
||
| @Schema(description = "Supported application protocols, if applicable") | ||
| public List<String> getApplicationProtocols() { | ||
| return applicationProtocols; | ||
| } | ||
|
|
||
| public void setApplicationProtocols(final List<String> applicationProtocols) { | ||
| this.applicationProtocols = applicationProtocols; | ||
| } | ||
|
|
||
| @Schema(description = "The type of component providing the listen port (e.g., Processor, ControllerService)") | ||
| public String getComponentType() { | ||
| return componentType; | ||
| } | ||
|
|
||
| public void setComponentType(final String componentType) { | ||
| this.componentType = componentType; | ||
| } | ||
|
|
||
| @Schema(description = "The id of the component providing the listen port") | ||
| public String getComponentId() { | ||
| return componentId; | ||
| } | ||
|
|
||
| public void setComponentId(final String componentId) { | ||
| this.componentId = componentId; | ||
| } | ||
|
|
||
| @Schema(description = "The name of the component providing the listen port") | ||
| public String getComponentName() { | ||
| return componentName; | ||
| } | ||
|
|
||
| public void setComponentName(final String componentName) { | ||
| this.componentName = componentName; | ||
| } | ||
|
|
||
| @Schema(description = "The class type of the component providing the listen port") | ||
| public String getComponentClass() { | ||
| return componentClass; | ||
| } | ||
|
|
||
| public void setComponentClass(final String componentClass) { | ||
| this.componentClass = componentClass; | ||
| } | ||
|
|
||
| @Schema(description = "The id of the process group containing the component providing the listen port, if applicable") | ||
| public String getParentGroupId() { | ||
| return parentGroupId; | ||
| } | ||
|
|
||
| public void setParentGroupId(final String parentGroupId) { | ||
| this.parentGroupId = parentGroupId; | ||
| } | ||
|
|
||
| @Schema(description = "The name of the process group containing the component providing the listen port, if applicable") | ||
| public String getParentGroupName() { | ||
| return parentGroupName; | ||
| } | ||
|
|
||
| public void setParentGroupName(final String parentGroupName) { | ||
| this.parentGroupName = parentGroupName; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return ("ListenPortDTO[portName= %s, portNumber=%s, transportProtocol=%s, applicationProtocols=%s, " + | ||
| "componentType=%s, componentId=%s, componentName=%s, componentClass=%s, parentGroupId=%s, parentGroupName=%s]").formatted( | ||
| portName, portNumber, transportProtocol, applicationProtocols, componentType, componentId, componentName, componentClass, parentGroupId, parentGroupName); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.