Naming in BindingTransactionChain, which operates
with user supplied Binding Transaction Chain listener
and chain's own DOM TransactionChain led to invalid
substition of this two, which caused IllegalStateException
when chain failed.
Change-Id: I2a40cd2c200f0b9b7149908f05d84685891c71ea
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
private final DOMTransactionChain delegate;
private final BindingToNormalizedNodeCodec codec;
private final DOMTransactionChain delegate;
private final BindingToNormalizedNodeCodec codec;
- private final DelegateChainListener delegatingListener;
- private final TransactionChainListener listener;
+ private final DelegateChainListener domListener;
+ private final TransactionChainListener bindingListener;
public BindingTranslatedTransactionChain(final DOMDataBroker chainFactory,
final BindingToNormalizedNodeCodec codec, final TransactionChainListener listener) {
Preconditions.checkNotNull(chainFactory, "DOM Transaction chain factory must not be null");
public BindingTranslatedTransactionChain(final DOMDataBroker chainFactory,
final BindingToNormalizedNodeCodec codec, final TransactionChainListener listener) {
Preconditions.checkNotNull(chainFactory, "DOM Transaction chain factory must not be null");
- this.delegatingListener = new DelegateChainListener();
- this.listener = listener;
- this.delegate = chainFactory.createTransactionChain(listener);
+ this.domListener = new DelegateChainListener();
+ this.bindingListener = listener;
+ this.delegate = chainFactory.createTransactionChain(domListener);
* chain, so we are not changing any of our internal state
* to mark that we failed.
*/
* chain, so we are not changing any of our internal state
* to mark that we failed.
*/
- this.delegatingListener.onTransactionChainFailed(this, tx, t);
+ this.bindingListener.onTransactionChainFailed(this, tx, t);
public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
Preconditions.checkState(delegate.equals(chain),
"Illegal state - listener for %s was invoked for incorrect chain %s.", delegate, chain);
public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
Preconditions.checkState(delegate.equals(chain),
"Illegal state - listener for %s was invoked for incorrect chain %s.", delegate, chain);
- listener.onTransactionChainSuccessful(BindingTranslatedTransactionChain.this);
+ bindingListener.onTransactionChainSuccessful(BindingTranslatedTransactionChain.this);