org.snmp4j.Snmp.handleInternalResponse()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.snmp4j.Snmp.handleInternalResponse()方法的一些代码示例,展示了Snmp.handleInternalResponse()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Snmp.handleInternalResponse()方法的具体详情如下:
包路径:org.snmp4j.Snmp
类名称:Snmp
方法名:handleInternalResponse

Snmp.handleInternalResponse介绍

暂无

代码示例

代码示例来源:origin: org.snmp4j/snmp4j

protected boolean resendRequest(PendingRequest request, PDU response) {
  if (request.useNextPDU()) {
    request.responseReceived = false;
    synchronized (pendingRequests) {
      pendingRequests.remove(request.key);
      PduHandle holdKeyUntilResendDone = request.key;
      request.key = null;
      handleInternalResponse(response, request.pdu, request.target.getAddress());
      try {
        sendMessage(request.pdu, request.target, request.transport, request);
      } catch (IOException e) {
        logger.error("IOException while resending request after RFC 5343 context engine ID discovery: " +
            e.getMessage(), e);
      }
      // now the previous retry can be released
      if (logger.isDebugEnabled()) {
        logger.debug("Releasing PDU handle " + holdKeyUntilResendDone);
      }
      holdKeyUntilResendDone = null;
    }
    return true;
  }
  return false;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

protected boolean resendRequest(PendingRequest request, PDU response) {
 if (request.useNextPDU()) {
  request.responseReceived = false;
  synchronized (pendingRequests) {
   pendingRequests.remove(request.key);
   PduHandle holdKeyUntilResendDone = request.key;
   request.key = null;
   handleInternalResponse(response, request.pdu, request.target.getAddress());
   try {
    sendMessage(request.pdu, request.target, request.transport, request);
   }
   catch (IOException e) {
    logger.error("IOException while resending request after RFC 5343 context engine ID discovery: " +
      e.getMessage(), e);
   }
   // now the previous retry can be released
   if (logger.isDebugEnabled()) {
    logger.debug("Releasing PDU handle "+holdKeyUntilResendDone);
   }
   holdKeyUntilResendDone = null;
  }
  return true;
 }
 return false;
}

相关文章