亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? snmp.java

?? /*_############################################################################ _## _## SNMP4J -
?? JAVA
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
  public void trap(PDUv1 pdu, Target target) throws IOException {
    if (target.getVersion() != SnmpConstants.version1) {
      throw new IllegalArgumentException(
          "SNMPv1 trap PDU must be used with SNMPv1");
    }
    pdu.setType(PDU.V1TRAP);
    send(pdu, target);
  }

  /**
   * Sends a SNMPv2c or SNMPv3 notification to a target. This method sets the
   * PDU's type to {@link PDU#NOTIFICATION} and then sends it to the supplied
   * target. This method is a convenience wrapper for the
   * {@link #send(PDU pdu, Target target)} method.
   * @param pdu
   *    a <code>PDUv1</code> instance.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>. The selected SNMP protocol version for the
   *    target must be {@link SnmpConstants#version2c} or
   *    {@link SnmpConstants#version2c}.
   * @throws IOException
   *    if the notification cannot be sent.
   * @since 1.1
   */
  public void notify(PDU pdu, Target target) throws IOException {
    if (target.getVersion() == SnmpConstants.version1) {
      throw new IllegalArgumentException(
          "Notifications PDUs cannot be used with SNMPv1");
    }
    pdu.setType(PDU.NOTIFICATION);
    send(pdu, target);
  }


  /**
   * Sends a SET request to a target. This method sets the PDU's type to
   * {@link PDU#SET} and then sends a synchronous request to the supplied
   * target.
   * @param pdu
   *    a <code>PDU</code> instance. For SNMPv3 messages, the supplied PDU
   *    instance has to be a <code>ScopedPDU</code> instance.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>.
   * @return
   *    the received response encapsulated in a <code>ResponseEvent</code>
   *    instance. To obtain the received response <code>PDU</code> call
   *    {@link ResponseEvent#getResponse()}. If the request timed out,
   *    that method will return <code>null</code>.
   * @since 1.1
   */
  public ResponseEvent set(PDU pdu, Target target) {
    pdu.setType(PDU.SET);
    try {
      return send(pdu, target);
    }
    catch (IOException ex) {
      return new ResponseEvent(this, null, pdu, null, target, ex);
    }
  }

  /**
   * Asynchronously sends a SET request <code>PDU</code> to the given target.
   * The response is then returned by calling the supplied
   * <code>ResponseListener</code> instance.
   *
   * @param pdu
   *    the PDU instance to send.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>.
   * @param userHandle
   *    an user defined handle that is returned when the request is returned
   *    via the <code>listener</code> object.
   * @param listener
   *    a <code>ResponseListener</code> instance that is called when
   *    <code>pdu</code> is a confirmed PDU and the request is either answered
   *    or timed out.
   * @throws IOException
   *    if the PDU cannot be sent to the target.
   * @since 1.1
   */
  public void set(PDU pdu, Target target, Object userHandle,
                  ResponseListener listener) throws IOException {
    pdu.setType(PDU.SET);
    send(pdu, target, userHandle, listener);
  }

  public ResponseEvent send(PDU pdu, Target target) throws IOException {
    return send(pdu, target, null);
  }

  /**
   * Sends a <code>PDU</code> to the given target and if the <code>PDU</code>
   * is a confirmed request, then the received response is returned
   * synchronously.
   * @param pdu
   *    a <code>PDU</code> instance. When sending a SNMPv1 trap PDU, the
   *    supplied PDU instance must be a <code>PDUv1</code>. For all types of
   *    SNMPv3 messages, the supplied PDU instance has to be a
   *    <code>ScopedPDU</code> instance.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>.
   * @param transport
   *    specifies the <code>TransportMapping</code> to be used when sending
   *    the PDU. If <code>transport</code> is <code>null</code>, the associated
   *    message dispatcher will try to determine the transport mapping by the
   *    <code>target</code>'s address.
   * @return
   *    the received response encapsulated in a <code>ResponseEvent</code>
   *    instance. To obtain the received response <code>PDU</code> call
   *    {@link ResponseEvent#getResponse()}. If the request timed out,
   *    that method will return <code>null</code>. If the sent <code>pdu</code>
   *    is an unconfirmed PDU (notification, response, or report), then
   *    <code>null</code> will be returned.
   * @throws IOException
   *    if the message could not be sent.
   * @see PDU
   * @see ScopedPDU
   * @see PDUv1
   */
  public ResponseEvent send(PDU pdu, Target target,
                            TransportMapping transport) throws IOException {
    if (!pdu.isConfirmedPdu()) {
      sendMessage(pdu, target, transport, null);
      return null;
    }
    SyncResponseListener syncResponse = new SyncResponseListener();
    PendingRequest retryRequest = null;
    synchronized (syncResponse) {
      PduHandle handle = null;
      PendingRequest request =
          new PendingRequest(syncResponse, target, pdu, target, transport);
      handle = sendMessage(pdu, target, transport, request);
      try {
        syncResponse.wait();
        retryRequest = (PendingRequest) pendingRequests.remove(handle);
        if (logger.isDebugEnabled()) {
          logger.debug("Removed pending request with handle: "+handle);
        }
        request.setFinished();
        request.cancel();
      }
      catch (InterruptedException iex) {
        logger.warn(iex);
        // ignore
      }
    }
    if (retryRequest != null) {
      synchronized (retryRequest) {
        retryRequest.setFinished();
        retryRequest.cancel();
      }
    }
    return syncResponse.response;
  }

  public void send(PDU pdu, Target target,
                   Object userHandle,
                   ResponseListener listener) throws IOException {
    send(pdu, target, null, userHandle, listener);
  }

  public void send(PDU pdu, Target target,
                   TransportMapping transport,
                   Object userHandle,
                   ResponseListener listener) throws IOException {
    if (!pdu.isConfirmedPdu()) {
      sendMessage(pdu, target, transport, null);
      return;
    }
    PendingRequest request =
        new AsyncPendingRequest(listener, userHandle, pdu, target, transport);
    sendMessage(pdu, target, transport, request);
  }

  /**
   * Sends a <code>PDU</code> to the given target and returns the received
   * response <code>PDU</code>.
   * @param pdu
   *    a <code>PDU</code> instance. When sending a SNMPv1 trap PDU, the
   *    supplied PDU instance must be a <code>PDUv1</code>. For all types of
   *    SNMPv3 messages, the supplied PDU instance has to be a
   *    <code>ScopedPDU</code> instance.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>.
   * @return
   *    the received response <code>PDU</code> or <code>null</code>
   *    if the request timed out and if the PDU type of <code>pdu</code>
   *    is an unconfirmed PDU (i.e., trap or notification).
   * @throws IOException
   *    if the message could not be sent.
   * @see PDU
   * @see ScopedPDU
   * @see PDUv1
   * @deprecated This method has been deprecated because it does not return
   * the transport address of the entity (target) that sent the response.
   * Please use {@link #send(PDU pdu, Target target)} instead. It returns
   * a {@link ResponseEvent} object holding the response PDU and transport
   * address of a successfully received response. This method will be supported
   * until v2.0.
   */
  public PDU sendPDU(PDU pdu, Target target) throws IOException {
    ResponseEvent e = send(pdu, target);
    if (e != null) {
      return e.getResponse();
    }
    // pdu sent is unconfirmed one
    return null;
  }

  /**
   * Asynchronously sends a <code>PDU</code> to the given target. The response
   * is then returned by calling the supplied <code>ResponseListener</code>
   * instance.
   *
   * @param pdu
   *    the PDU instance to send.
   * @param target
   *    the Target instance representing the target SNMP engine where to send
   *    the <code>pdu</code>.
   * @param userHandle
   *    an user defined handle that is returned when the request is returned
   *    via the <code>listener</code> object.
   * @param listener
   *    a <code>ResponseListener</code> instance that is called when
   *    <code>pdu</code> is a confirmed PDU and the request is either answered
   *    or timed out.
   * @deprecated Please use {@link #send(PDU pdu, Target target, Object
   *    userHandle, ResponseListener listener)} instead. It has exactly
   *    the same function but follows the new naming scheme. This method
   *    will be supported until v2.0.
   * @throws IOException
   *    if the PDU could not be sent to the specified target.
   */
  public void sendPDU(PDU pdu,
                      Target target,
                      Object userHandle,
                      ResponseListener listener) throws IOException {
    send(pdu, target, userHandle, listener);
  }

  /**
   * 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.
   * @throws IOException
   *    if the transport fails to send the PDU or the if the message cannot
   *    be BER encoded.
   * @return PduHandle
   *    that uniquely identifies the sent PDU for further reference.
   */
  protected PduHandle sendMessage(PDU pdu, Target target,
                                  TransportMapping transport,
                                  PduHandleCallback pduHandleCallback)
      throws IOException
  {
    PduHandle handle = null;
    if (target instanceof SecureTarget) {
      SecureTarget secureTarget = (SecureTarget) target;
      handle = messageDispatcher.sendPdu(transport,
                                         secureTarget.getAddress(),
                                         secureTarget.getVersion(),
                                         secureTarget.getSecurityModel(),
                                         secureTarget.getSecurityName().
                                         getValue(),
                                         secureTarget.getSecurityLevel(),
                                         pdu, true, pduHandleCallback);
    }
    else if (target instanceof CommunityTarget) {
      CommunityTarget communityTarget = (CommunityTarget) target;
      int securityModel = SecurityModel.SECURITY_MODEL_SNMPv2c;
      if (communityTarget.getVersion() == SnmpConstants.version1) {
        securityModel = SecurityModel.SECURITY_MODEL_SNMPv1;
      }
      handle = messageDispatcher.sendPdu(transport,
                                         communityTarget.getAddress(),
                                         communityTarget.getVersion(),
                                         securityModel,
                                         communityTarget.getCommunity().
                                         getValue(),
                                         SecurityLevel.NOAUTH_NOPRIV,
                                         pdu, true, pduHandleCallback);

    }
    return handle;
  }

  public void cancel(PDU request, ResponseListener listener) {
    AsyncRequestKey key = new AsyncRequestKey(request, listener);
    PduHandle pending = (PduHandle) asyncRequests.remove(key);
    if (logger.isDebugEnabled()) {
      logger.debug("Cancelling pending request with handle " + pending);
    }
    if (pending != null) {
      PendingRequest pendingRequest =
          (PendingRequest) pendingRequests.remove(pending);
      if (pendingRequest != null) {
        synchronized (pendingRequest) {
          pendingRequest.setFinished();
          pendingRequest.cancel();
        }
      }
    }
  }

  /**
   * Sets the local engine ID for the SNMP entity represented by this
   * <code>Snmp</code> instance. This is a convenience method that sets
   * the local engine ID in the associated <code>MPv3</code> and
   * <code>USM</code>.
   * @param engineID
   *    a byte array containing the local engine ID. The length and content
   *    has to comply with the constraints defined in the SNMP-FRAMEWORK-MIB.
   * @param engineBoots
   *    the number of boots of this SNMP engine (zero based).
   * @param engineTime
   *    the number of seconds since the value of engineBoots last changed.
   * @see MPv3
   * @see USM

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产色站一区二区三区| 自拍偷在线精品自拍偷无码专区| 欧美日韩高清一区二区不卡| 91丝袜美腿高跟国产极品老师 | 中文字幕一区二区在线播放| 2024国产精品| 久久久久久免费网| 久久久久国产一区二区三区四区| 久久嫩草精品久久久精品| 亚洲精品一线二线三线| 国产亚洲一区二区在线观看| www国产精品av| 午夜欧美一区二区三区在线播放| 亚洲日本中文字幕区| 亚洲婷婷国产精品电影人久久| 亚洲欧美在线视频观看| 亚洲欧美日韩系列| 午夜激情久久久| 日日摸夜夜添夜夜添国产精品| 久久精品国产99国产| 久久99精品国产91久久来源| 国产在线不卡一区| 成人综合在线观看| 在线影院国内精品| 欧美精品欧美精品系列| 日韩三级在线免费观看| 久久精品免视看| 国产精品毛片久久久久久久| 亚洲一区二区精品视频| 香蕉成人伊视频在线观看| 久久99蜜桃精品| 成人激情免费电影网址| 91国产精品成人| 日韩视频在线你懂得| 欧美国产日本视频| 国产精品伦一区| 亚洲国产美女搞黄色| 日韩不卡一区二区| 国产精品主播直播| 一本色道久久综合亚洲91| 欧美伦理电影网| 2023国产精品视频| 亚洲精品福利视频网站| 日本大胆欧美人术艺术动态| 风流少妇一区二区| 欧美在线观看视频在线| 精品美女一区二区| 亚洲久本草在线中文字幕| 免费成人在线观看| 成人av电影免费在线播放| 欧美日韩欧美一区二区| 久久久午夜精品理论片中文字幕| 亚洲老司机在线| 激情图区综合网| 在线视频国内自拍亚洲视频| 欧美一区二区精品| 国产精品美女久久久久久2018| 午夜精品免费在线| www.欧美色图| 欧美一区二区在线不卡| 亚洲日穴在线视频| 国产精品一区二区三区乱码| 欧美性videosxxxxx| 久久久久久久综合色一本| 亚洲.国产.中文慕字在线| 成人午夜在线播放| 日韩久久久久久| 一区二区三区高清不卡| 国产精品1区二区.| 91精品国产综合久久久蜜臀图片 | 国产精品亚洲第一区在线暖暖韩国| 色悠久久久久综合欧美99| 国产日韩精品一区二区三区| 婷婷开心激情综合| 色噜噜久久综合| 中文字幕一区二区三区不卡 | 91网站在线播放| 国产色91在线| 麻豆91精品91久久久的内涵| 欧美午夜影院一区| 国产精品传媒视频| 国产麻豆精品视频| 欧美电视剧在线观看完整版| 一区二区三区免费网站| 成a人片亚洲日本久久| 久久久精品免费网站| 蜜臀av在线播放一区二区三区| 91色婷婷久久久久合中文| 国产欧美精品区一区二区三区| 久久草av在线| 在线不卡一区二区| 亚洲最大的成人av| 色天使色偷偷av一区二区| 亚洲视频免费看| www.亚洲人| 国产精品家庭影院| 波多野结衣中文字幕一区| 久久先锋资源网| 精品一区二区免费在线观看| 欧美一级夜夜爽| 视频一区视频二区中文字幕| 欧美日韩一区二区在线视频| 亚洲综合成人网| 欧美在线你懂得| 亚洲一区免费在线观看| 欧美日韩在线综合| 国产精品初高中害羞小美女文| 美腿丝袜亚洲色图| 欧美一区二区性放荡片| 成人综合激情网| 欧美色偷偷大香| 亚洲二区在线视频| 欧美老女人在线| 亚洲自拍欧美精品| 欧美日韩久久久一区| 亚洲国产精品视频| 欧美日韩免费观看一区三区| 亚洲成a天堂v人片| 狠狠色丁香久久婷婷综合_中| 国产资源精品在线观看| 日韩一区二区三区视频| 亚洲一区二区在线观看视频| 大尺度一区二区| 久久影视一区二区| 麻豆国产精品777777在线| 欧美日韩亚州综合| 亚洲综合清纯丝袜自拍| 成人国产精品视频| 国产精品青草久久| 国产成人精品一区二区三区四区 | caoporm超碰国产精品| 久久一区二区三区四区| 久久精品国产秦先生| 欧美一二区视频| 日韩成人一级大片| 欧美日韩精品综合在线| 亚洲午夜精品在线| 欧美日韩电影在线| 婷婷夜色潮精品综合在线| 欧美久久久一区| 强制捆绑调教一区二区| 日韩视频中午一区| 国产自产高清不卡| 国产女人18毛片水真多成人如厕| 国产精品一区免费在线观看| 欧美激情在线一区二区三区| 不卡的电影网站| 综合久久国产九一剧情麻豆| 在线欧美小视频| 石原莉奈一区二区三区在线观看| 91精品国产黑色紧身裤美女| 男女视频一区二区| 国产日韩欧美不卡| av不卡一区二区三区| 一卡二卡三卡日韩欧美| 欧美裸体一区二区三区| 久久电影网电视剧免费观看| 精品噜噜噜噜久久久久久久久试看| 国产综合一区二区| 国产精品毛片a∨一区二区三区| 91亚洲精品乱码久久久久久蜜桃| 亚洲午夜在线电影| 91精品麻豆日日躁夜夜躁| 国产一区二区三区四区五区入口 | 日韩欧美电影一二三| 国产一区二区不卡| 国产精品国产a| 欧美日高清视频| 精久久久久久久久久久| 亚洲日本丝袜连裤袜办公室| 欧美日韩国产高清一区二区| 精品中文字幕一区二区小辣椒| 欧美国产精品专区| 欧美日韩午夜在线| 国产精品一级片| 亚洲电影视频在线| 久久久久免费观看| 在线免费观看视频一区| 国产伦理精品不卡| 亚洲精品伦理在线| 欧美xxxx在线观看| 色婷婷国产精品久久包臀| 免费观看91视频大全| 亚洲国产精品成人综合色在线婷婷 | 亚洲一区二区三区激情| 精品国产青草久久久久福利| 91在线观看污| 经典三级一区二区| 一区二区三区久久| 国产日产欧美一区二区三区| 欧美午夜精品一区二区三区| 国产激情91久久精品导航| 亚洲综合激情另类小说区| 国产午夜久久久久| 91精品欧美一区二区三区综合在| 成人精品一区二区三区四区| 精品亚洲aⅴ乱码一区二区三区| 一区二区免费视频| 国产精品亲子伦对白| 日韩一级大片在线|