Package org.snmp4j.model.transaction
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 Summary
Modifier and TypeMethodDescriptionList<? extends SnmpCommitResult>
commit
(SnmpTransaction transaction, SnmpCommitListener commitListener) Commits the transaction to the agent.getSnmpTransaction
(SnmpTransactionStrategy transactionStrategy) boolean
isAtomic
(SnmpTransaction transaction) Checks if this transaction can be committed with atomicity.void
rollback
(SnmpTransaction transaction)
-
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
-
getSnmpTransaction
-
isAtomic
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 returnfalse
.- 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).
-