I’m trying to send the notification from the Snmp4jDemoMib asynchronously. Javadoc from AgentConfigManager.getNotificationOriginator() tells me to use AgentConfigManager.getAgentNotificationOriginator() for this. But this method returns the same (synchronous) NotificationOriginator. Shouldn’t AgentConfigManager.getAgentNotificationOriginator() return agent instead of agent.getNotificationOriginator()?
Hi,
sending a notification is always asynchronous. Thus, do not really understand the question.
Can you add more details on what you are trying to accomplish?
Best regards
Frank
Sorry for the missing details. I mean sending an inform and waiting for the replay. This waits blocking on the current thread if you use the NotificationOriginator returned by AgentConfigManager.getNotificationOriginator().
Javadoc from AgentConfigManager.getNotificationOriginator(): To get the (multi-threaded) NotificationOriginator of the agent, use getAgentNotificationOriginator instead.
But this returns the same NotificationOriginator. If AgentConfigManager.getAgentNotificationOriginator() returned agent, the notification would be dispatched to the thread pool and therefore wouldn’t block the current thread. I think this is what javadoc wants to tell me.
Yes, you are right. AgentConfigManager.getAgentNotificationOriginator() will return agent (which is implementing NotificationOriginator interface too) starting from the next release. That is what was meant by the JavaDoc.