450a8ed2b6607cd19446c096d21964cf054799ae
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / restconf / handlers / TransactionChainHandler.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.restconf.handlers;
9
10 import com.google.common.base.Preconditions;
11 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
12
13
14 /**
15  * Implementation of {@link TransactionChainHandler}
16  *
17  */
18 public class TransactionChainHandler implements Handler<DOMTransactionChain> {
19
20     private final DOMTransactionChain transactionChain;
21
22     /**
23      * Prepare transaction chain service for Restconf services
24      *
25      * @param transactionChain
26      */
27     public TransactionChainHandler(final DOMTransactionChain transactionChain) {
28         Preconditions.checkNotNull(transactionChain);
29         this.transactionChain = transactionChain;
30     }
31
32     @Override
33     public DOMTransactionChain get() {
34         return this.transactionChain;
35     }
36 }