Interface TransactionManager

All Known Subinterfaces:
SnmpService
All Known Implementing Classes:
LocalSnmpService, SNMP4JAgentSnmpService

public interface TransactionManager
This is the central interface for SNMP transaction management with SNMP4J command generator applications.
Author:
Frank Fock
  • Method Details

    • commit

      List<? extends SnmpCommitResult> commit(SnmpTransaction transaction, SnmpCommitListener commitListener)
      Commits the transaction to the agent.
      Parameters:
      transaction - the transaction to commit.
      commitListener - the optional listener that is immediately informed during this commit call about failures and successful committed change sets.
      Returns:
      the SnmpErrorStatus indicating success or failure reason of the transaction.
    • rollback

      void rollback(SnmpTransaction transaction)
    • getSnmpTransaction

      SnmpTransaction getSnmpTransaction(SnmpTransactionStrategy transactionStrategy)
    • isAtomic

      boolean isAtomic(SnmpTransaction transaction)
      Checks if this transaction can be committed with atomicity. As SNMP guarantees atomicity only for a single SET PDU. That is, if a transaction cannot be completed with a single SET PDU (message), this method will return false.
      Parameters:
      transaction - the transaction to test.
      Returns:
      true if this transaction can be committed by using a single SET PDU. Thus, the variables to set do not exceed the target's maximum size PDU length (including estimated SNMP message overhead).