2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.mdsal.dom.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ClassToInstanceMap;
12 import com.google.common.collect.ImmutableClassToInstanceMap;
13 import org.eclipse.jdt.annotation.NonNull;
16 * Marker interface for services which can support {@link DOMServiceExtension}. Aside for marking
17 * these, they also provide runtime query to detect whether a particular trait is in fact available.
19 * @param <T> Base {@link DOMService}
20 * @param <E> Extension type
23 public interface DOMExtensibleService<T extends DOMExtensibleService<T, E>,
24 E extends DOMServiceExtension<T, E>> extends DOMService {
26 * Return a map of currently-supported extensions, along with accessor services which provide access to the specific
27 * functionality bound to this service. Default implementation reports no extensions.
29 * @return A map of supported functionality.
31 default @NonNull ClassToInstanceMap<E> getExtensions() {
32 return ImmutableClassToInstanceMap.of();