Module org.snmp4j

Class SnmpBuilder

java.lang.Object
org.snmp4j.fluent.SnmpBuilder

public class SnmpBuilder extends Object
Builds a Snmp instance through step-by-step configuration using a fluent interface design pattern. This SnmpBuilder is the starting context. It creates the non-fluent Snmp instance that is needed to as first parameter for SnmpCompletableFuture.send(Snmp, Target, PDU, Object...) which actually sends the SNMP message to a Target. Use TargetBuilder and PduBuilder to create the other two mandatory parameters. To get a TargetBuilder call target(Address). The PduBuilder can be then retrieved from that TargetBuilder by calling TargetBuilder.pdu(). For a complete code sample see https://snmp4j.org.
  //Brief flow description of using the new SNMP4J fluent interface:
  SnmpBuilder.udp()...build() => Snmp
  SnmpBuilder.target(..) => TargetBuilder
      TargetBuilder.user(..)...done()...build() => Target
      TargetBuilder.pdu()...build() => PDUrequest
  SnmpCompletableFuture.send(Snmp, Target, PDUrequest) => SnmpCompletableFuture
  SnmpCompletableFuture.get() => PDUresponse
 
Since:
3.5.0
Author:
Frank Fock