Convert rcf8040 from web.xml to programmtic web API
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / handlers / DOMMountPointServiceHandler.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.nb.rfc8040.handlers;
9
10 import java.util.Objects;
11 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
12
13 /**
14  * Implementation of {@link DOMMountPointServiceHandler}.
15  *
16  */
17 public final class DOMMountPointServiceHandler implements Handler<DOMMountPointService> {
18     private final DOMMountPointService domMountPointService;
19
20     /**
21      * Prepare mount point service for Restconf services.
22      *
23      * @param domMountPointService
24      *             mount point service
25      */
26     private DOMMountPointServiceHandler(final DOMMountPointService domMountPointService) {
27         this.domMountPointService = Objects.requireNonNull(domMountPointService);
28     }
29
30     public static DOMMountPointServiceHandler newInstance(DOMMountPointService domMountPointService) {
31         return new DOMMountPointServiceHandler(domMountPointService);
32     }
33
34     @Override
35     public DOMMountPointService get() {
36         return this.domMountPointService;
37     }
38 }