Reduce JSR305 proliferation
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMExtensibleService.java
1 /*
2  * Copyright (c) 2015 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.controller.md.sal.dom.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Map;
12 import org.eclipse.jdt.annotation.NonNull;
13
14 /**
15  * Marker interface for services which can support {@link DOMServiceExtension}.
16  * Aside for marking these, they also provide runtime query to detect whether
17  * a particular trait is in fact available.
18  *
19  * @param <T> Base {@link DOMService}
20  * @param <E> Extension type
21  */
22 @Beta
23 public interface DOMExtensibleService<T extends DOMExtensibleService<T, E>,
24         E extends DOMServiceExtension<T, E>> extends DOMService {
25     /**
26      * Return a map of currently-supported extensions, along with accessor services
27      * which provide access to the specific functionality bound to this service.
28      *
29      * @return A map of supported functionality.
30      */
31     @NonNull Map<Class<? extends E>, E> getSupportedExtensions();
32 }