Implement RESTCONF Extensibility (discovery)
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / RootFoundApplication.java
1 /*
2  * Copyright (c) 2020 ZTE Corp. 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;
9
10 import java.util.Set;
11 import javax.ws.rs.core.Application;
12 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.errors.RestconfDocumentedExceptionMapper;
13 import org.opendaylight.restconf.nb.rfc8040.rests.services.api.RootResourceDiscoveryService;
14 import org.opendaylight.restconf.nb.rfc8040.services.wrapper.RootResourceDiscoveryServiceImpl;
15
16 public class RootFoundApplication extends Application {
17     private final RootResourceDiscoveryService rrds = new RootResourceDiscoveryServiceImpl();
18
19     @Override
20     public Set<Class<?>> getClasses() {
21         return Set.of(RestconfDocumentedExceptionMapper.class);
22     }
23
24     @Override
25     public Set<Object> getSingletons() {
26         return Set.of(rrds);
27     }
28 }