org.snmp4j.smi.OID.append()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(160)

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

OID.append介绍

[英]Appends a sub-identifier to this OID.
[中]将子标识符追加到此OID。

代码示例

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

/**
 * Appends an unsigned long sub-identifier value to this OID.
 *
 * @param subID an unsigned long value less or equal to 2^32-1.
 * @return a pointer to this OID instance (useful for chaining).
 * @since 1.2
 */
public final OID appendUnsigned(long subID) {
  return append((int) (subID & 0xFFFFFFFFL));
}

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

/**
 * Appends an unsigned long sub-identifier value to this OID.
 * @param subID
 *    an unsigned long value less or equal to 2^32-1.
 * @return
 *    a pointer to this OID instance (useful for chaining).
 * @since 1.2
 */
public final OID appendUnsigned(long subID) {
 return append((int)(subID & 0xFFFFFFFFL));
}

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

private static OID createAccessIndex(OctetString groupName,
                   OctetString contextPrefix,
                   int securityModel, int securityLevel) {
 OID index = groupName.toSubIndex(false);
 index.append(contextPrefix.toSubIndex(false));
 index.append(securityModel);
 index.append(securityLevel);
 return index;
}

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

/**
 * Appends a dotted String OID to this {@code OID}.
 * @param oid
 *    a dotted String with numerical sub-identifiers.
 * @return
 *    a pointer to this OID instance (useful for chaining).
 */
public final OID append(String oid) {
 OID suffix = new OID(oid);
 return append(suffix);
}

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

/**
 * Appends a dotted String OID to this <code>OID</code>.
 * @param oid
 *    a dotted String with numerical sub-identifiers.
 * @return
 *    a pointer to this OID instance (useful for chaining).
 */
public final OID append(String oid) {
 OID suffix = new OID(oid);
 return append(suffix);
}

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

private static OID createGroupIndex(int securityModel,
                  OctetString securityName) {
 OID index = new OID();
 index.append(securityModel);
 index.append(securityName.toSubIndex(false));
 return index;
}

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

private static OID createGroupIndex(int securityModel,
                  OctetString securityName) {
 OID index = new OID();
 index.append(securityModel);
 index.append(securityName.toSubIndex(false));
 return index;
}

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

public OID getCellOID(OID index, int col) {
  OID retval = new OID(oid);
  retval.append(columns[col].getColumnID());
  retval.append(index);
  return retval;
}

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

public OID getCellOID(OID index, int col) {
 OID retval = new OID(oid);
 retval.append(columns[col].getColumnID());
 retval.append(index);
 return retval;
}

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

/**
 * Appends a dotted String OID to this {@code OID}.
 *
 * @param oid a dotted String with numerical sub-identifiers.
 * @return a pointer to this OID instance (useful for chaining).
 */
public final OID append(String oid) {
  OID suffix = new OID(oid);
  return append(suffix);
}

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

private static OID createViewIndex(OctetString viewName, OID subtree) {
 OID index = viewName.toSubIndex(false);
 index.append(subtree.toSubIndex(false));
 return index;
}

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

private static OID createViewIndex(OctetString viewName, OID subtree) {
 OID index = viewName.toSubIndex(false);
 index.append(subtree.toSubIndex(false));
 return index;
}

代码示例来源:origin: com.rogueai/snmp2bean

protected OID appendRawOids(OID oid, int[] integers) {
  if (oid == null)
    return new OID(integers);
  
  oid.append(new OID(integers));
  return oid;
}

代码示例来源:origin: OpenNMS/opennms

public void put(String oid, Variable value) {
  OID oidKey = new OID(m_base);
  oidKey.append(oid);
  m_values.put(oidKey, value);
}

代码示例来源:origin: OpenNMS/opennms

private OID nextOID(OID requested) {
  OID next = new OID(requested);
  next.append(0);
  return next;
}

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

public final OID toSubIndex(boolean impliedLength) {
  if (impliedLength) {
    return new OID(value);
  }
  OID subIndex = new OID(new int[]{size()});
  subIndex.append(this);
  return subIndex;
}

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

public final OID toSubIndex(boolean impliedLength) {
 if (impliedLength) {
  return new OID(value);
 }
 OID subIndex = new OID(new int[] { size() });
 subIndex.append(this);
 return subIndex;
}

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

private OID createIndex(OctetString engineID, OctetString userName) {
 if (engineID.length() == 0) {
  engineID = usm.getLocalEngineID();
 }
 OID index = engineID.toSubIndex(false);
 index.append(userName.toSubIndex(false));
 return index;
}

代码示例来源:origin: oVirt/ovirt-engine

private void addString(PDU pdu, OID prefix, int suffix, String val, boolean allowEmpty) {
  if (allowEmpty || !StringUtils.isEmpty(val)) {
    pdu.add(new VariableBinding(new OID(prefix).append(suffix), new OctetString(val == null ? "" : val)));
  }
}

代码示例来源:origin: com.rogueai/snmp2bean

private VariableBinding buildCreateVariableBinding(Object entry) throws IllegalAccessException, SnmpAnnotationException {
  OID indexOid = pduBuilder.buildIndexOID(entry);
  checkIndexOid(indexOid);
  RowStatus rowStatus = entry.getClass().getAnnotation(RowStatus.class);
  checkRowStatusAnnotation(rowStatus);
  OID oid = new OID(rowStatus.oid());
  oid.append(indexOid);
  Integer32 var = new Integer32(rowStatus.create());
  return new VariableBinding(oid, var);
}

相关文章