code: public int updatePort(final int newPort) {
          int oldPort = this.port;
          this.port = newPort;
  
          if (oldPort != newPort) {
              sendNotification(new AttributeChangeNotification(this, sequenceNum.incrementAndGet(), System.currentTimeMillis(), this.toString()
                                                                                                                                + " port value changed", "Port", "java.lang.Integer", oldPort, newPort));
          }
  
          return oldPort;
      }
docs: Update the port value for this end point.
  Will emit an AttributeChangeNotification if the value changed.
  
  @param newPort The new (or current) port value. If no change, no notification is sent.
  @return int The previous port value