[SNMP4J] implementing auto-reconnection Agentx -> master-agent
Frank Fock
fock at agentpp.com
Fri Nov 24 00:13:57 CET 2006
Hello Amit,
Theoretically, reconnecting should work, however a few flaws
in the current implementation make it difficult to reach
that goal. I will provide an improved implementation soon,
for the RC release.
To recognize a connection loss in the sub-agent you can
use:
((ConnectionOrientedTransportMapping)
session.getPeer().getTransport()).addTransportStateListener(this);
where "this" needs to implement the TransportStateListener
interface.
Best regards,
Frank
Amit Dor-Shifer wrote:
> Hello all.
>
> an AgentX subagent of ours, derived from AgentXSubagent, communicates
> with a master agent (NetSNMP). I'm running TestSubagent against snmpd:
> I launched snmpd, then the test program, successfully tested a query,
> and then restarted the master agent. It seems that the test program
> doesn't initiate a re-connection.
>
> How would you recommend adding such a capability to the subagent? Is
> this by-any-chance configurable? Or is there some code adding that needs
> to be done? If so, what API should I look into?
>
> Thanks,
>
> Amit
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list