private void createTransportMapping() throws IOException {
    if (transportMapping == null) {
      synchronized (this) {
        if (transportMapping == null) {
          if (port != null) {
            LOG.info("Setting SNMP dispatch port: " + port);
            transportMapping = new DefaultUdpTransportMapping(new UdpAddress(port), true);
          } else {
            transportMapping = new DefaultUdpTransportMapping();
          }
        }
      }
    }
  }
Creates SNMP server with specified port. In case port is null will be used random value as default
@param port port
@throws IOException
ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/SNMPDispatcher.java