Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1550#discussion_r103783512
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
---
@@ -856,10 +864,75 @@ public void refreshFlowContents() throws
CommunicationsException {
}
}
+ @Override
+ public String getNetworkInterface() {
+ readLock.lock();
+ try {
+ return networkInterfaceName;
+ } finally {
+ readLock.unlock();
+ }
+ }
+
+ @Override
+ public void setNetworkInterface(final String interfaceName) {
+ writeLock.lock();
+ try {
+ this.networkInterfaceName = interfaceName;
+
+ try {
+ final Enumeration<InetAddress> inetAddresses =
NetworkInterface.getByName(interfaceName).getInetAddresses();
+
+ if (inetAddresses.hasMoreElements()) {
+ this.localAddress = inetAddresses.nextElement();
--- End diff --
I guess my thought is that the user is selecting a name that results in a
mapping. What if one of the objects within the enumeration is at some point
invalid, doesn't that break the user's assumption that he or she would always
get a valid InetAddress that is bound to that network interface name?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---