2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.restconf.nb.rfc8040.handlers;
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
16 * Implementation of {@link TransactionChainHandler}.
19 public class TransactionChainHandler implements Handler<DOMTransactionChain> {
21 private DOMTransactionChain transactionChain;
24 * Prepare transaction chain service for Restconf services.
26 * @param transactionChain Transaction chain
28 public TransactionChainHandler(final DOMTransactionChain transactionChain) {
29 Preconditions.checkNotNull(transactionChain);
30 this.transactionChain = transactionChain;
34 @SuppressWarnings("checkstyle:hiddenField")
35 public void update(final DOMTransactionChain transactionChain) {
36 Preconditions.checkNotNull(transactionChain);
37 this.transactionChain = transactionChain;
41 public DOMTransactionChain get() {
42 return this.transactionChain;