6a89d29b9949e96e1f1acf098dededa34b5506d7
[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 javax.inject.Inject;
13 import javax.inject.Singleton;
14 import org.apache.aries.blueprint.annotation.service.Reference;
15 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
16
17 /**
18  * Implementation of {@link DOMMountPointServiceHandler}.
19  */
20 @Singleton
21 public final class DOMMountPointServiceHandler implements Handler<DOMMountPointService> {
22     private final DOMMountPointService domMountPointService;
23
24     /**
25      * Prepare mount point service for Restconf services.
26      *
27      * @param domMountPointService
28      *             mount point service
29      */
30     @Inject
31     public DOMMountPointServiceHandler(final @Reference DOMMountPointService domMountPointService) {
32         this.domMountPointService = requireNonNull(domMountPointService);
33     }
34
35     @Override
36     public DOMMountPointService get() {
37         return this.domMountPointService;
38     }
39 }