protected static String getDispatchProperty(Map<String, String> dispatchProperties, String key) throws InvalidSnmpConfigurationException {
    if (dispatchProperties == null || !dispatchProperties.containsKey(key)) {
      throw new InvalidSnmpConfigurationException(String.format("Property \"%s\" should be set.", key));
    }
    return dispatchProperties.get(key);
  }
Get dispatch property with specific key from dispatch properties.
@param dispatchProperties dispatch properties
@param key property key
@return property value
@throws InvalidSnmpConfigurationException if property with such key does not exist
ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/SNMPDispatcher.java