Merge "Allow no payload for RPCs with no input"
[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 static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
13
14 /**
15  * Implementation of {@link DOMMountPointServiceHandler}.
16  *
17  */
18 public final class DOMMountPointServiceHandler implements Handler<DOMMountPointService> {
19     private final DOMMountPointService domMountPointService;
20
21     /**
22      * Prepare mount point service for Restconf services.
23      *
24      * @param domMountPointService
25      *             mount point service
26      */
27     private DOMMountPointServiceHandler(final DOMMountPointService domMountPointService) {
28         this.domMountPointService = requireNonNull(domMountPointService);
29     }
30
31     public static DOMMountPointServiceHandler newInstance(final DOMMountPointService domMountPointService) {
32         return new DOMMountPointServiceHandler(domMountPointService);
33     }
34
35     @Override
36     public DOMMountPointService get() {
37         return this.domMountPointService;
38     }
39 }