Package org.snmp4j.agent.agentx
Class AgentXRequestPDU
java.lang.Object
org.snmp4j.agent.agentx.AgentXPDU
org.snmp4j.agent.agentx.AgentXContextPDU
org.snmp4j.agent.agentx.AgentXRequestPDU
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AgentXGetBulkPDU,AgentXGetNextPDU,AgentXGetPDU
The
AgentXRequestPDU represents the base class for all agentx-Get*Request-PDUs defined by RFC 2741.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe next OID filter can filter OIDs returned by AgentX GetNext and GetBulk operations before they are returned to the master agent.protected org.snmp4j.agent.MOScope[]The request ranges.Fields inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
contextFields 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
ConstructorsModifierConstructorDescriptionprotectedAgentXRequestPDU(byte type, org.snmp4j.smi.OctetString context) Creates aAgentXRequestPDUfrom payload values.protectedAgentXRequestPDU(byte type, org.snmp4j.smi.OctetString context, org.snmp4j.agent.MOScope[] ranges) Creates aAgentXRequestPDUfrom payload values.protectedAgentXRequestPDU(AgentXMessageHeader header) Creates aAgentXRequestPDUfrom aAgentXMessageHeader. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecodeAfterContext(ByteBuffer buf, int length) Decode this PDU after the end of the encoded context.protected voidEncode this PDU after already encoded context (thus context will not be encoded by this operation).protected intGets the encoded length after an already encoded context.org.snmp4j.agent.MOScope[]Gets the ranges of this request.intsize()Gets the size of the ranges array.protected StringReturns a string representation of the PDU members.Methods inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
beforeEncode, decodePayload, encodePayload, getContext, getPayloadLength, setContextMethods 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
-
ranges
protected org.snmp4j.agent.MOScope[] rangesThe request ranges. -
nextOidFilter
The next OID filter can filter OIDs returned by AgentX GetNext and GetBulk operations before they are returned to the master agent.- Since:
- 4.1.0
-
-
Constructor Details
-
AgentXRequestPDU
protected AgentXRequestPDU(byte type, org.snmp4j.smi.OctetString context) Creates aAgentXRequestPDUfrom payload values.- Parameters:
type- the PDU type.context- the SNMPv3 context.
-
AgentXRequestPDU
protected AgentXRequestPDU(byte type, org.snmp4j.smi.OctetString context, org.snmp4j.agent.MOScope[] ranges) Creates aAgentXRequestPDUfrom payload values.- Parameters:
type- the PDU type.context- the SNMPv3 context.ranges- the requested ranges.
-
AgentXRequestPDU
Creates aAgentXRequestPDUfrom aAgentXMessageHeader.- Parameters:
header- the message header.
-
-
Method Details
-
decodeAfterContext
Description copied from class:AgentXContextPDUDecode this PDU after the end of the encoded context.- Specified by:
decodeAfterContextin classAgentXContextPDU- 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 fewer data than expected.
-
encodeAfterContext
Description copied from class:AgentXContextPDUEncode this PDU after already encoded context (thus context will not be encoded by this operation).- Specified by:
encodeAfterContextin classAgentXContextPDU- Parameters:
buf- the target buffer.
-
getAfterContextLength
protected int getAfterContextLength()Description copied from class:AgentXContextPDUGets the encoded length after an already encoded context.- Specified by:
getAfterContextLengthin classAgentXContextPDU- Returns:
- the BER encoded length (without context).
-
size
public int size()Gets the size of the ranges array.- Returns:
- the number of ranges in this request.
-
getRanges
public org.snmp4j.agent.MOScope[] getRanges()Gets the ranges of this request.- Returns:
- an array of
MOScopeinstances.
-
toStringExtMembers
Description copied from class:AgentXPDUReturns a string representation of the PDU members. An empty string is returned by this base class.- Overrides:
toStringExtMembersin classAgentXContextPDU- Returns:
- a string representation of the PDU members.
-