示例#1
0
 /**
  * Adds an pdu. This method adds the Pdu and checks if discovery is needed depending on the
  * parameter <code>checkDiscovery</code>. If discovery is needed this method will block until it
  * have done so. Discovery is only needed if the stack is non authoritative.
  *
  * @param pdu the pdu
  * @param checkDiscovery check if discovery is needed
  * @return pdu is succesful added
  * @see AbstractSnmpContext#addPdu(Pdu)
  * @see #addDiscoveryPdu(DiscoveryPdu)
  * @see #addPdu(Pdu)
  */
 protected boolean addPdu(Pdu pdu, boolean checkDiscovery)
     throws java.io.IOException, PduException {
   boolean added = super.addPdu(pdu);
   if (checkDiscovery == true && isAuthoritative(pdu.getMsgType()) == false) {
     discoverIfNeeded();
   }
   return added;
 }