class SNMPDispatcher implements NotificationDispatcher {

  @Override
  public void dispatch(Notification notification) {
    LOG.info("Sending SNMP trap: {}", notification.Subject);
    try {
      createTransportMapping();
      snmp = new Snmp(transportMapping);
      SnmpVersion snmpVersion = getSnmpVersion(notification.DispatchProperties);
      sendTraps(notification, snmpVersion);
      successCallback(notification);
    } catch (InvalidSnmpConfigurationException ex) {
      LOG.error("Unable to dispatch SNMP trap with invalid configuration. " + ex.getMessage());
      failureCallback(notification);
    } catch (Exception ex) {
      LOG.error("Error occurred during SNMP trap dispatching.", ex);
      failureCallback(notification);
      transportMapping = null;
    }
  }

  public  SNMPDispatcher(Snmp snmp);
  public  SNMPDispatcher();
  public  SNMPDispatcher(Integer port);

}