Package org.snmp4j

Examples of org.snmp4j.Target


  public List<TableEvent> getTableSync(final A address, final OID lowerBoundIndex, final OID upperBoundIndex,
      final OID... columnOids) {

    checkNoNulls(address, lowerBoundIndex, upperBoundIndex, columnOids);

    final Target target = this.createTarget(address);
    final TableUtils tableUtils = new TableUtils(this.snmp, new DefaultPDUFactory());
    return tableUtils.getTable(target, columnOids, lowerBoundIndex, upperBoundIndex);
  }
View Full Code Here


  public void setAsync(final A address, final ResponseListener listener, final Object handle,
      final VariableBinding... bindings) throws IOException {

    checkNoNulls(address, listener, bindings);

    final Target target = this.createTarget(address);
    final PDU requestPdu = this.createRequestPdu(PDU.SET, target, bindings);
    this.snmp.send(requestPdu, target, handle, listener);
  }
View Full Code Here

  @Override
  public ResponseEvent setSync(final A address, final VariableBinding... bindings) throws IOException {

    checkNoNulls(address, bindings);

    final Target target = this.createTarget(address);
    final PDU requestPdu = this.createRequestPdu(PDU.SET, target, bindings);
    return this.snmp.send(requestPdu, target);
  }
View Full Code Here

   * @see org.chiefly.sunlamp.SNMP#walkAsync(org.snmp4j.smi.Address, org.snmp4j.util.TreeListener, java.lang.Object,
   *      org.snmp4j.smi.OID)
   */
  @Override
  public void walkAsync(final A address, final TreeListener listener, final Object handle, final OID oid) {
    final Target target = this.createTarget(address);
    final TreeUtils treeUtils = new TreeUtils(this.snmp, new DefaultPDUFactory());
    treeUtils.setIgnoreLexicographicOrder(true);
    treeUtils.getSubtree(target, oid, handle, listener);
  }
View Full Code Here

  /**
   * @see org.chiefly.sunlamp.SNMP#walkSync(org.snmp4j.smi.Address, org.snmp4j.smi.OID)
   */
  @Override
  public List<TreeEvent> walkSync(final A address, final OID oid) {
    final Target target = this.createTarget(address);
    final TreeUtils treeUtils = new TreeUtils(this.snmp, new DefaultPDUFactory());
    treeUtils.setIgnoreLexicographicOrder(true);
    return treeUtils.getSubtree(target, oid);
  }
View Full Code Here

  /**
   * @param address The {@link Address} to query.
   * @return Returns a fully-initialized {@link Target} instance.
   */
  protected Target createTarget(final A address) {
    final Target target = this.createVersionSpecificTarget();
    target.setAddress(address);
    target.setRetries(this.retries);
    target.setTimeout(this.timeout);
    return target;
  }
View Full Code Here

      final VariableBinding... bindings) throws IOException {

    checkNoNulls(address, enterprise, bindings);
    checkV1Bindings(bindings);

    final Target target = this.createTarget(address);
    final PDUv1 requestPdu = (PDUv1) this.createRequestPdu(PDU.V1TRAP, target, bindings);
    requestPdu.setEnterprise(enterprise);
    requestPdu.setGenericTrap(genericTrap);
    requestPdu.setSpecificTrap(specificTrap);
    this.getSnmp().send(requestPdu, target);
View Full Code Here

  public void getBulkAsync(final A address, final int maxRepetitions, final int nonRepeaters,
      final ResponseListener listener, final Object handle, final OID... oids) throws IOException {

    checkNoNulls(address, listener, oids);

    final Target target = this.createTarget(address);
    final PDU requestPdu = this.createRequestPdu(PDU.GETBULK, target, VariableBindings.wrapOids(oids));
    requestPdu.setMaxRepetitions(maxRepetitions);
    requestPdu.setNonRepeaters(nonRepeaters);
    this.getSnmp().send(requestPdu, target, handle, listener);
  }
View Full Code Here

  public ResponseEvent getBulkSync(final A address, final int maxRepetitions, final int nonRepeaters,
      final OID... oids) throws IOException {

    checkNoNulls(address, oids);

    final Target target = this.createTarget(address);
    final PDU requestPdu = this.createRequestPdu(PDU.GETBULK, target, VariableBindings.wrapOids(oids));
    requestPdu.setMaxRepetitions(maxRepetitions);
    requestPdu.setNonRepeaters(nonRepeaters);
    return this.getSnmp().send(requestPdu, target);
  }
View Full Code Here

  public void informAsync(final A address, final ResponseListener listener, final Object handle,
      final VariableBinding... bindings) throws IOException {

    checkNoNulls(address, listener, bindings);

    final Target target = this.createTarget(address);
    final PDU requestPdu = this.createRequestPdu(PDU.INFORM, target, bindings);
    this.getSnmp().send(requestPdu, target, handle, listener);
  }
View Full Code Here

TOP

Related Classes of org.snmp4j.Target

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.