Snmp4jCfgSecSrcAddrValidation(OID oid, MOAccess access) { super(oid, access, new Integer32(), new int[]{Snmp4jCfgSecSrcAddrValidationEnum.enabled, Snmp4jCfgSecSrcAddrValidationEnum.disabled, Snmp4jCfgSecSrcAddrValidationEnum.notAvailable}); //--AgentGen BEGIN=snmp4jCfgSecSrcAddrValidation //--AgentGen END }
Snmp4jDemoSparseTableType(OID oid, MOAccess access) { super(oid, access, new Integer32(), new int[] { Snmp4jDemoSparseTableTypeEnum.cross, Snmp4jDemoSparseTableTypeEnum.square, Snmp4jDemoSparseTableTypeEnum.stairsDown, Snmp4jDemoSparseTableTypeEnum.stairsUp, Snmp4jDemoSparseTableTypeEnum.rain, Snmp4jDemoSparseTableTypeEnum.random }); //--AgentGen BEGIN=snmp4jDemoSparseTableType //--AgentGen END }
Snmp4jCfgSecSrcAddrValidation(OID oid, MOAccess access) { super(oid, access, new Integer32(), new int[] { Snmp4jCfgSecSrcAddrValidationEnum.enabled, Snmp4jCfgSecSrcAddrValidationEnum.disabled, Snmp4jCfgSecSrcAddrValidationEnum.notAvailable }); //--AgentGen BEGIN=snmp4jCfgSecSrcAddrValidation //--AgentGen END }
SnmpTsmConfigurationUsePrefix(OID oid, MOAccess access) { super(oid, access, new Integer32()); //--AgentGen BEGIN=snmpTsmConfigurationUsePrefix //--AgentGen END }
/** * Removes all variable bindings from the PDU and sets the request ID to zero. * This can be used to reuse a PDU for another request. */ public void clear() { variableBindings.clear(); setRequestID(new Integer32(0)); }
/** * Removes all variable bindings from the PDU and sets the request ID to zero. * This can be used to reuse a PDU for another request. */ public void clear() { variableBindings.clear(); setRequestID(new Integer32(0)); }
/** * Gets the security model for the supplied ID. * @param id * a security model ID. * @return * a <code>SecurityModel</code> instance if the supplied ID * is supported, otherwise <code>null</code> is returned. */ public SecurityModel getSecurityModel(int id) { return securityModels.getSecurityModel(new Integer32(id)); }
/** * Adds a security model to the central repository of security models. * @param model * a <code>SecurityModel</code>. If a security model with the same ID * already */ public void addSecurityModel(SecurityModel model) { securityModels.put(new Integer32(model.getID()), model); }
/** * Removes all variable bindings from the PDU and sets the request ID to zero. * This can be used to reuse a PDU for another request. */ public void clear() { variableBindings.clear(); setRequestID(new Integer32(0)); }
private Snmp4jLogLoggerRow createLoggerRow(int n, LogAdapter logger, int storageType) { OID index = getLoggerIndex(logger); Variable[] row = new Variable[5]; int i=0; row[i++] = new Integer32(n); row[i++] = new Integer32(logger.getLogLevel().getLevel()); row[i++] = new Integer32(logger.getEffectiveLogLevel().getLevel()); row[i++] = new Integer32(storageType); row[i++] = new Integer32(RowStatus.active); return new Snmp4jLogLoggerRow(index, row, n, logger); }
private Snmp4jLogLoggerRow createLoggerRow(int n, LogAdapter logger, int storageType) { OID index = getLoggerIndex(logger); Variable[] row = new Variable[5]; int i=0; row[i++] = new Integer32(n); row[i++] = new Integer32(logger.getLogLevel().getLevel()); row[i++] = new Integer32(logger.getEffectiveLogLevel().getLevel()); row[i++] = new Integer32(storageType); row[i ] = new Integer32(RowStatus.active); return new Snmp4jLogLoggerRow(index, row, n, logger); }
public VariableBinding make(String oid, Object value) throws MappingFailedException { Integer i = (Integer)value; return new VariableBinding(new OID(oid), new Integer32(i)); } } // class SnmpInt32Maker
public Integer32 getValue() { if (snmpCommunityMIB != null) { if (snmpCommunityMIB.isSourceAddressFiltering()) { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.enabled)); } else { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.disabled)); } } else { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.notAvailable)); } return (Integer32) super.getValue().clone(); }
@Override public Integer32 getValue() { return new Integer32(getUSM().getEngineTime()); } @Override
public Variable getValue(int column) { if (column == idxSnmp4jLogLoggerEffectiveLevel) { values[column] = new Integer32(((Snmp4jLogLoggerRow)this). getLogAdapter().getEffectiveLogLevel().getLevel()); } return super.getValue(column); } //--AgentGen END
@Override protected void doStop() throws Exception { super.doStop(); try { SecurityModels.getInstance().removeSecurityModel(new Integer32(this.usm.getID())); } finally { this.targetAddress = null; this.usm = null; this.target = null; } }
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); }
private void updateStatusInfo(int securityLevel, StatusInformation statusInfo, CounterEvent event) { if (statusInfo != null) { statusInfo.setSecurityLevel(new Integer32(securityLevel)); statusInfo.setErrorIndication(new VariableBinding(event.getOid(), event.getCurrentValue())); } }
private void updateStatusInfo(int securityLevel, StatusInformation statusInfo, CounterEvent event) { if (statusInfo != null) { statusInfo.setSecurityLevel(new Integer32(securityLevel)); statusInfo.setErrorIndication(new VariableBinding(event.getOid(), event.getCurrentValue())); } }