public boolean belongsToTables(OID oid) { for (OID attributeOID : tables) { if (oid.startsWith(attributeOID)) { return true; } } return false; }
public boolean belongsToTables(OID oid) { for (OID attributeOID : tables) { if (oid.startsWith(attributeOID)) { return true; } } return false; }
protected boolean isTableEnd(OID firstReqOid, OID firstRespOid) { // TODO: END OF MIB return !firstRespOid.startsWith(firstReqOid); }
protected VariableBinding findVariableBindingByOid(OID oid, Vector<?> variableBindings) { for (Iterator<?> it = variableBindings.iterator(); it.hasNext();) { VariableBinding vb = (VariableBinding) it.next(); if (vb.getOid().startsWith(oid)) { return vb; } } return null; }
protected Variable findVariableByOid(OID oid, Vector<?> variableBindings) { for (Iterator<?> it = variableBindings.iterator(); it.hasNext();) { VariableBinding vb = (VariableBinding) it.next(); if (vb.getOid().startsWith(oid)) { return vb.getVariable(); } } return null; }
public U find(OID prefix) { for (Iterator<U> it = iterator(); it.hasNext(); ) { U sreq = it.next(); if (sreq.getVariableBinding().getOid().startsWith(prefix)) { return sreq; } } return null; }
public SubRequest find(OID prefix) { for (Iterator it = iterator(); it.hasNext(); ) { SubRequest sreq = (SubRequest) it.next(); if (sreq.getVariableBinding().getOid().startsWith(prefix)) { return sreq; } } return null; }
public void snmpTlstmServerCertificateUnknown(NotificationOriginator notificationOriginator, OctetString context, VariableBinding[] vbs) { if (vbs.length < 1) { throw new IllegalArgumentException("Too few notification objects: " + vbs.length + "<1"); } if (!(vbs[0].getOid().startsWith(oidTrapVarSnmpTlstmSessionUnknownServerCertificate))) { throw new IllegalArgumentException("Variable 0 has wrong OID: " + vbs[0].getOid() + " does not start with " + oidTrapVarSnmpTlstmSessionUnknownServerCertificate); } notificationOriginator.notify(context, oidSnmpTlstmServerCertificateUnknown, vbs); } // Named traps:
public List<VariableBinding> walk(OID oid, int count) { List<VariableBinding> varbinds = new ArrayList<VariableBinding>(); OID nextTarget = oid; for (int i = 0; i < count; i++) { VariableBinding vb = next(nextTarget); if (vb == null || !vb.getOid().startsWith(oid)) { return varbinds; } varbinds.add(vb); nextTarget = vb.getOid(); } return varbinds; }
private static boolean isInSubtree(OID oid, OID subtree, OctetString mask) { OID maskedSubtree = subtree.mask(mask); OID maskedOID = oid.mask(mask); if (maskedOID.equals(maskedSubtree)) { return true; } return maskedOID.startsWith(maskedSubtree); }
private static boolean isInSubtree(OID oid, OID subtree, OctetString mask) { OID maskedSubtree = subtree.mask(mask); OID maskedOID = oid.mask(mask); if (maskedOID.equals(maskedSubtree)) { return true; } return maskedOID.startsWith(maskedSubtree); }
/** * @param oid * @return */ public VariableBinding get(OID oid) { for (OID agentKey : m_subAgents.keySet()) { if (oid.startsWith(agentKey)) { SubAgent subAgent = m_subAgents.get(agentKey); return subAgent.get(oid); } } return null; }
public boolean isCovered(MOScope other) { return (other.getLowerBound().startsWith(oid) && (other.getLowerBound().size() > oid.size() || other.isLowerIncluded())) && (other.getUpperBound().startsWith(oid) && ((other.getUpperBound().size() > oid.size()) || other.isUpperIncluded())); }
public final OID getIndexPart(OID anyOID) { int offset = oid.size()+1; if ((anyOID.size() <= offset) || (!anyOID.startsWith(oid))) { return null; } return new OID(anyOID.getValue(), offset, anyOID.size() - offset); }
public CellInfo(OID oid) { this.index = getIndexPart(oid); if ((oid.size() > DefaultMOTable.this.oid.size()) && (oid.startsWith(DefaultMOTable.this.oid))) { id = oid.get(DefaultMOTable.this.oid.size()); } /* else { id = columns[0].getColumnID(); } */ }
public final OID getIndexPart(OID anyOID) { int offset = oid.size() + 1; if ((anyOID.size() <= offset) || (!anyOID.startsWith(oid))) { return null; } return new OID(anyOID.getValue(), offset, anyOID.size() - offset); }
public CellInfo(DefaultMOTable table, OID oid) { this.table = table; this.index = table.getIndexPart(oid); if ((oid.size() > table.oid.size()) && (oid.startsWith(table.oid))) { id = oid.get(table.oid.size()); } }
@Override public boolean isCovered(MOScope other) { return (other.getLowerBound().startsWith(oid) && (other.getLowerBound().size() > oid.size() || other.isLowerIncluded())) && (other.getUpperBound().startsWith(oid) && ((other.getUpperBound().size() > oid.size()) || other.isUpperIncluded())); }
public void incrementCounter(CounterEvent event) { if ((event.getOid().startsWith(usmStatsPrefix)) && (event.getOid().size() > usmStatsPrefix.size())) { Counter32 current = (Counter32) usmStats[event.getOid().get(usmStatsPrefix.size())-1].getValue(); current.increment(); event.setCurrentValue((Counter32)current.clone()); } }
public void incrementCounter(CounterEvent event) { if ((event.getOid().startsWith(usmStatsPrefix)) && (event.getOid().size() > usmStatsPrefix.size())) { Counter32 current = (Counter32) usmStats[event.getOid().get(usmStatsPrefix.size())-1].getValue(); current.increment(); event.setCurrentValue((Counter32)current.clone()); } }