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

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

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

Snmp.lookupTransportMapping介绍

暂无

代码示例

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

/**
 * Actually sends a PDU to a target and returns a handle for the sent PDU.
 *
 * @param pdu
 *         the <code>PDU</code> instance to be sent.
 * @param target
 *         a <code>Target</code> instance denoting the target SNMP entity.
 * @param transport
 *         the (optional) transport mapping to be used to send the request.
 *         If <code>transport</code> is <code>null</code> a suitable transport
 *         mapping is determined from the <code>target</code> address.
 * @param pduHandleCallback
 *         callback for newly created PDU handles before the request is sent out.
 *
 * @return PduHandle
 * that uniquely identifies the sent PDU for further reference.
 * @throws IOException
 *         if the transport fails to send the PDU or the if the message cannot
 *         be BER encoded.
 */
protected PduHandle sendMessage(PDU pdu, Target target, TransportMapping<?> transport,
                PduHandleCallback<PDU> pduHandleCallback)
    throws IOException {
  TransportMapping<?> tm = transport;
  if (tm == null) {
    tm = lookupTransportMapping(target);
  }
  return messageDispatcher.sendPdu(tm, target,
      pdu, true, pduHandleCallback);
}

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

tm = lookupTransportMapping(target);

相关文章