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