java.lang.Object
org.snmp4j.fluent.TargetBuilder.DirectUserBuilder
- Enclosing class:
TargetBuilder<A extends Address>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDirectUserBuilder(OctetString securityName) protectedDirectUserBuilder(OctetString securityName, byte[] authoritativeEngineID) -
Method Summary
Modifier and TypeMethodDescriptionauth(TargetBuilder.AuthProtocol authenticationProtocol) authPassphrase(String authPassword) authPassphrase(OctetString authPassword) This will set thedeferLocalizationUntilFirstUsagetotrue.done()Finalizes the configuration of the DirectUserTarget and returns the enclosing TargetBuilder instance.priv(TargetBuilder.PrivProtocol privacyProtocol) privPassphrase(String privPassword) privPassphrase(OctetString privPassword)
-
Constructor Details
-
DirectUserBuilder
-
DirectUserBuilder
-
-
Method Details
-
deferLocalizationUntilFirstUsage
This will set thedeferLocalizationUntilFirstUsagetotrue. The target's authoritative engine ID will be resolved whileSnmp.sendMessage(PDU, Target, TransportMapping, PduHandleCallback)is being executed then. Thus, the computing-intensive localization of the provided passphrases to localized keys will be done while sending the message, not when the target is created. This might need adjustment to theTargetBuilder.timeout(long)andTargetBuilder.retries(int)values. If set tofalse(which is the default), then the target's authoritative engine ID will be resolved whendone()is being executed.- Returns:
- this.
- Since:
- 3.9.3
-
auth
-
priv
-
authPassphrase
-
authPassphrase
-
privPassphrase
-
privPassphrase
-
done
Finalizes the configuration of the DirectUserTarget and returns the enclosing TargetBuilder instance. This method processes the necessary information, such as security protocols, passwords, and engine IDs, to construct a DirectUserTarget with appropriate security attributes. If the authoritative engine ID is not provided explicitly and localization is not deferred until the first usage, it attempts to discover the engine ID. The method also handles generating authentication and privacy keys if required.- Returns:
- The enclosing TargetBuilder instance, allowing actually building the target with
TargetBuilder.build().
-