本文整理了Java中org.snmp4j.smi.OID.successor()
方法的一些代码示例,展示了OID.successor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OID.successor()
方法的具体详情如下:
包路径:org.snmp4j.smi.OID
类名称:OID
方法名:successor
[英]Returns the successor OID for this OID.
[中]返回此OID的后续OID。
代码示例来源:origin: OpenNMS/opennms
/**
* <p>findNextOid</p>
*
* @param given a {@link org.snmp4j.smi.OID} object.
* @return a {@link org.snmp4j.smi.OID} object.
*/
public OID findNextOid(final OID given) {
final OID next = given.successor();
final SortedMap<OID, Object> tail = m_vars.tailMap(next);
if (tail.isEmpty()) {
return null;
}
return tail.firstKey();
}
代码示例来源:origin: org.opennms.tests/org.opennms.tests.mock-snmp-agent
/**
* <p>findNextOid</p>
*
* @param given a {@link org.snmp4j.smi.OID} object.
* @return a {@link org.snmp4j.smi.OID} object.
*/
public OID findNextOid(final OID given) {
final OID next = given.successor();
final SortedMap<OID, Object> tail = m_vars.tailMap(next);
if (tail.isEmpty()) {
return null;
}
return tail.firstKey();
}
代码示例来源:origin: com.github.kaitoy.sneo/sneo-core
private VariableBinding next(OID oid) {
SortedMap<OID, Variable> tail;
synchronized (variableBindings) {
tail = variableBindings.tailMap(oid.successor());
}
if (tail.size() == 0) {
return null;
}
OID first = tail.firstKey();
return new VariableBinding(first, get(first));
}
代码示例来源:origin: com.github.kaitoy.sneo/sneo-core
public OID find(MOScope range) {
OID targetOid = range.getLowerBound();
SortedMap<OID, Variable> tail;
if (range.isLowerIncluded()) {
synchronized (variableBindings) {
tail = variableBindings.tailMap(targetOid);
}
}
else {
synchronized (variableBindings) {
tail = variableBindings.tailMap(targetOid.successor());
}
}
if (tail.size() == 0) {
return null;
}
return tail.firstKey();
}
代码示例来源:origin: org.opennms.tests/org.opennms.tests.mock-snmp-agent
/** {@inheritDoc} */
@Override
public OID find(final MOScope range) {
if (!m_scope.isOverlapping(range)) {
return null;
}
OID first = range.getLowerBound();
if (range.isLowerIncluded()) {
first = first.successor();
}
final SortedMap<OID, Object> tail = m_vars.tailMap(first);
if (tail.isEmpty()) {
return null;
}
return tail.firstKey(); // skip the leading '.'
}
代码示例来源:origin: OpenNMS/opennms
/** {@inheritDoc} */
@Override
public OID find(final MOScope range) {
if (!m_scope.isOverlapping(range)) {
return null;
}
OID first = range.getLowerBound();
if (range.isLowerIncluded()) {
first = first.successor();
}
final SortedMap<OID, Object> tail = m_vars.tailMap(first);
if (tail.isEmpty()) {
return null;
}
return tail.firstKey(); // skip the leading '.'
}
代码示例来源:origin: org.snmp4j/snmp4j-agent
public boolean passesFilter(OID paramsIndex, OID notificationID,
VariableBinding[] vbs) {
MOTableRowFilter<DefaultMOMutableRow2PC> activeFilter =
new RowStatus.ActiveRowsFilter<DefaultMOMutableRow2PC>(idxSnmpNotifyFilterProfileRowStatus);
List<DefaultMOMutableRow2PC> profiles =
snmpNotifyFilterProfileEntryModel.getRows(paramsIndex,
paramsIndex.successor(),
activeFilter);
return passesFilter(notificationID, vbs, profiles);
}
代码示例来源:origin: org.kaazing/snmp4j-agent
public boolean passesFilter(OID paramsIndex, OID notificationID,
VariableBinding[] vbs) {
MOTableRowFilter activeFilter =
new RowStatus.ActiveRowsFilter(idxSnmpNotifyFilterProfileRowStatus);
List profiles =
snmpNotifyFilterProfileEntryModel.getRows(paramsIndex,
paramsIndex.successor(),
activeFilter);
return passesFilter(notificationID, vbs, profiles);
}
内容来源于网络,如有侵权,请联系作者删除!