/* * @(#)file SnmpScopedPduBulk.java * @(#)author Sun Microsystems, Inc. * @(#)version 1.14 * @(#)date 06/05/03 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * */ package com.sun.jmx.snmp; /** * Represents a get-bulk PDU as defined in RFC 1448. *

*

* The SnmpSocpedPduBulk extends {@link com.sun.jmx.snmp.SnmpScopedPduPacket SnmpScopedPduPacket} * and defines attributes specific to the get-bulk PDU (see RFC 1448). * *

This API is a Sun Microsystems internal API and is subject * to change without notice.

* @since 1.5 */ public class SnmpScopedPduBulk extends SnmpScopedPduPacket implements SnmpPduBulkType { /** * The non-repeaters value. * @serial */ int nonRepeaters; /** * The max-repetitions value. * @serial */ int maxRepetitions; public SnmpScopedPduBulk() { type = pduGetBulkRequestPdu; version = snmpVersionThree; } /** * The max-repetitions setter. * @param max Maximum repetition. */ public void setMaxRepetitions(int max) { maxRepetitions = max; } /** * The non-repeaters setter. * @param nr Non repeaters. */ public void setNonRepeaters(int nr) { nonRepeaters = nr; } /** * The max-repetitions getter. * @return Maximum repetition. */ public int getMaxRepetitions() { return maxRepetitions; } /** * The non-repeaters getter. * @return Non repeaters. */ public int getNonRepeaters() { return nonRepeaters; } /** * Generates the pdu to use for response. * @return Response pdu. */ public SnmpPdu getResponsePdu() { SnmpScopedPduRequest result = new SnmpScopedPduRequest(); result.address = address ; result.port = port ; result.version = version ; result.requestId = requestId; result.msgId = msgId; result.msgMaxSize = msgMaxSize; result.msgFlags = msgFlags; result.msgSecurityModel = msgSecurityModel; result.contextEngineId = contextEngineId; result.contextName = contextName; result.securityParameters = securityParameters; result.type = pduGetResponsePdu ; result.errorStatus = SnmpDefinitions.snmpRspNoError ; result.errorIndex = 0 ; return result; } }