Teach RFC8040 restconf about actions
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / handlers / ActionServiceHandler.java
1 /*
2  * Copyright (C) 2019 Ericsson Software Technology AB. 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.eclipse.jdt.annotation.NonNull;
16 import org.opendaylight.mdsal.dom.api.DOMActionService;
17
18 /**
19  * Implementation of {@link ActionServiceHandler}.
20  */
21 @Singleton
22 public class ActionServiceHandler implements Handler<DOMActionService> {
23     private final @NonNull DOMActionService actionService;
24
25     /**
26      * Set DOMActionService.
27      *
28      * @param actionService
29      *             DOMActionService
30      */
31     @Inject
32     public ActionServiceHandler(final @Reference DOMActionService actionService) {
33         this.actionService = requireNonNull(actionService);
34     }
35
36     @Override
37     public @NonNull DOMActionService get() {
38         return this.actionService;
39     }
40 }