Package org.snmp4j.agent.agentx
Class AgentXGetBulkPDU
java.lang.Object
org.snmp4j.agent.agentx.AgentXPDU
org.snmp4j.agent.agentx.AgentXContextPDU
org.snmp4j.agent.agentx.AgentXRequestPDU
org.snmp4j.agent.agentx.AgentXGetBulkPDU
- All Implemented Interfaces:
Serializable
The
AgentXGetBulkPDU
represents the agentx-GetBulk-PDU defined by RFC 2741.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected short
GETBULK maximum repetitions.protected short
GETBULK non-repeaters.Fields inherited from class org.snmp4j.agent.agentx.AgentXRequestPDU
ranges
Fields inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
context
Fields inherited from class org.snmp4j.agent.agentx.AgentXPDU
AGENTX_ADDAGENTCAPS_PDU, AGENTX_CLEANUPSET_PDU, AGENTX_CLOSE_PDU, AGENTX_COMMITSET_PDU, AGENTX_GET_PDU, AGENTX_GETBULK_PDU, AGENTX_GETNEXT_PDU, AGENTX_INDEXALLOCATE_PDU, AGENTX_INDEXDEALLOCATE_PDU, AGENTX_NOTIFY_PDU, AGENTX_OPEN_PDU, AGENTX_PING_PDU, AGENTX_REGISTER_PDU, AGENTX_REMOVEAGENTCAPS_PDU, AGENTX_RESPONSE_PDU, AGENTX_TESTSET_PDU, AGENTX_UNDOSET_PDU, AGENTX_UNREGISTER_PDU, byteOrder, flags, packetID, RESERVED, sessionID, transactionID, type, version
-
Constructor Summary
ConstructorDescriptionAgentXGetBulkPDU
(AgentXMessageHeader header) Creates aAgentXGetBulkPDU
from aAgentXMessageHeader
.AgentXGetBulkPDU
(org.snmp4j.smi.OctetString context, short maxRepetitions, short nonRepeaters, org.snmp4j.agent.MOScope[] ranges) Creates aAgentXOpenPDU
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decodeAfterContext
(ByteBuffer buf, int length) Decode this PDU after the end of the encoded context.protected void
Encode this PDU after already encoded context (thus context will not be encoded by this operation).protected int
Gets the encoded length after an already encoded context.short
Gets the maximum GETBULK repetitions.short
Gets the non repeaters.void
setMaxRepetitions
(short maxRepetitions) Sets the maximum repetitions for the GETBULK.void
setNonRepeaters
(short nonRepeaters) Sets the non repeaters (0 for no non-repeaters).protected String
Returns a string representation of the PDU members.Methods inherited from class org.snmp4j.agent.agentx.AgentXRequestPDU
getRanges, size
Methods inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
beforeEncode, decodePayload, encodePayload, getContext, getPayloadLength, setContext
Methods inherited from class org.snmp4j.agent.agentx.AgentXPDU
addFlag, decode, encode, getByteOrder, getFlags, getPacketID, getSessionID, getTransactionID, getType, getVersion, isConfirmedPDU, isFlagSet, setByteOrder, setFlags, setPacketID, setSessionAttributes, setSessionID, setTransactionID, setType, setVersion, toString
-
Field Details
-
maxRepetitions
protected short maxRepetitionsGETBULK maximum repetitions. -
nonRepeaters
protected short nonRepeatersGETBULK non-repeaters.
-
-
Constructor Details
-
AgentXGetBulkPDU
public AgentXGetBulkPDU(org.snmp4j.smi.OctetString context, short maxRepetitions, short nonRepeaters, org.snmp4j.agent.MOScope[] ranges) Creates aAgentXOpenPDU
.- Parameters:
context
- the SNMPv3 context.maxRepetitions
- the maximum GETBULK repetitions.nonRepeaters
- the GETBULK non-repeaters.ranges
- the request OID search ranges.
-
AgentXGetBulkPDU
Creates aAgentXGetBulkPDU
from aAgentXMessageHeader
.- Parameters:
header
- the message header.
-
-
Method Details
-
getMaxRepetitions
public short getMaxRepetitions()Gets the maximum GETBULK repetitions.- Returns:
- the maximum repetitions.
-
getNonRepeaters
public short getNonRepeaters()Gets the non repeaters.- Returns:
- the non repeaters.
-
setMaxRepetitions
public void setMaxRepetitions(short maxRepetitions) Sets the maximum repetitions for the GETBULK.- Parameters:
maxRepetitions
- the maximum repetitions.
-
setNonRepeaters
public void setNonRepeaters(short nonRepeaters) Sets the non repeaters (0 for no non-repeaters).- Parameters:
nonRepeaters
- the non repeaters.
-
decodeAfterContext
Description copied from class:AgentXContextPDU
Decode this PDU after the end of the encoded context.- Overrides:
decodeAfterContext
in classAgentXRequestPDU
- Parameters:
buf
- the buffer positioned at the end of the encoded context.length
- the length of the PDU to be decoded.- Throws:
IOException
- if the buffer contains less data than expected.
-
encodeAfterContext
Description copied from class:AgentXContextPDU
Encode this PDU after already encoded context (thus context will not be encoded by this operation).- Overrides:
encodeAfterContext
in classAgentXRequestPDU
- Parameters:
buf
- the target buffer.
-
getAfterContextLength
protected int getAfterContextLength()Description copied from class:AgentXContextPDU
Gets the encoded length after an already encoded context.- Overrides:
getAfterContextLength
in classAgentXRequestPDU
- Returns:
- the BER encoded length (without context).
-
toStringExtMembers
Description copied from class:AgentXPDU
Returns a string representation of the PDU members. An empty string is returned by this base class.- Overrides:
toStringExtMembers
in classAgentXRequestPDU
- Returns:
- a string representation of the PDU members.
-