Class PduBuilder
java.lang.Object
org.snmp4j.fluent.PduBuilder
- All Implemented Interfaces:
PDUFactory
- Since:
- 3.5.0
- Author:
- Frank Fock
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OctetStringprotected OctetStringprotected intprotected final TargetBuilder<?> protected List<VariableBinding> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the actualPDUbased on the previously provided parameters and return it.build(int messageProcessingModel) Build the actualPDUbased on the previously provided parameters and return it.contextEngineID(byte[] contextEngineID) contextEngineID(OctetString contextEngineID) contextName(String contextName) contextName(OctetString contextName) createPDU(MessageProcessingModel messageProcessingModel) Creates aPDUinstance that is compatible with the given SNMP version (message processing model).Creates aPDUinstance for the supplied target.Initialize the PDU with the previously provided parameters.type(int pduType) vbs(VariableBinding... vbs)
-
Field Details
-
targetBuilder
-
contextEngineID
-
contextName
-
pduType
protected int pduType -
vbs
-
-
Constructor Details
-
PduBuilder
-
-
Method Details
-
contextName
-
contextName
-
contextEngineID
-
contextEngineID
-
type
-
oid
-
oids
-
vb
-
vbs
-
build
-
build
Build the actualPDUbased on the previously provided parameters and return it.- Parameters:
messageProcessingModel- a message processing model ID (seeMessageProcessingModel.getID()).- Returns:
- a new
PDUinstance. For an SNMP version greater or equal 3, aScopedPDUis returned. - Since:
- 3.11.0
-
initPdu
-
createPDU
Description copied from interface:PDUFactoryCreates aPDUinstance for the supplied target. The created PDU has to be compliant to the SNMP version defined by the supplied target. For example, a SNMPv3 target requires a ScopedPDU instance.- Specified by:
createPDUin interfacePDUFactory- Parameters:
target- theTargetwhere the PDU to be created will be sent.- Returns:
- PDU a PDU instance that is compatible with the supplied target.
-
createPDU
Description copied from interface:PDUFactoryCreates aPDUinstance that is compatible with the given SNMP version (message processing model).- Specified by:
createPDUin interfacePDUFactory- Parameters:
messageProcessingModel- aMessageProcessingModelinstance.- Returns:
- a
PDUinstance that is compatible with the given SNMP version (message processing model).
-