// TODO: check if the engine is already alive
try {
UdpAddress targetAddress = new UdpAddress(port);
// TransportMapping transport = new DefaultUdpTransportMapping(targetAddress);
snmp = new Snmp(new DefaultUdpTransportMapping());
snmpTrapEventPoller = new SnmpTrapEventPoller(severityOid);
eventContext.registerEventPoller(snmpTrapEventPoller, pollInterval);
// TODO set up the community here
if (!snmp.addNotificationListener(targetAddress, snmpTrapEventPoller))
throw new IOException("cannot attach to " + targetAddress);