Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1550#discussion_r103793832
  
    --- 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 --
    
    @markap14 One option might be to return all InetAddresses within the 
enumeration but this doesn't seem necessary for an unlikely case. I'm not sure 
that approach is even necessary or makes sense. Given that you clearly 
evaluated that and other options I'm good. The assumption is clear to me. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to