You're missing listening port definition in your code. This is how it should work
TransportMapping transport = new DefaultUdpTransportMapping(new UdpAddress("192.8.8.8/161"));
- 161 port for listening to standard snmp agent query responses
- 162 listening for snmp agent trap messages
But iam not sure if i fully understand your question. SNMP clients (managers) are used to query snmp agents running on network devices (such as routers, PCs, printers etc) and receive responses for these queries. Managers also listen for trap messages fired by snmp agents. Is your purpose to create snmp manager or agent?