b8022ce455bf03079749cf1613bd499d495f7e3a
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMSchemaService.java
1 /*
2  * Copyright (c) 2013 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 org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.concepts.Registration;
12 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
13 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener;
14
15 public interface DOMSchemaService extends DOMService<DOMSchemaService, DOMSchemaService.Extension> {
16     /**
17      * Type capture of a {@link DOMService.Extension} applicable to {@link DOMSchemaService} implementations.
18      */
19     interface Extension extends DOMService.Extension<DOMSchemaService, Extension> {
20         // Marker interface
21     }
22
23     /**
24      * Returns global schema context.
25      *
26      * @return schemaContext
27      */
28     EffectiveModelContext getGlobalContext();
29
30     /**
31      * Register a listener for changes in schema context.
32      *
33      * @param listener Listener which should be registered
34      * @return Listener registration handle
35      * @throws NullPointerException if {@code listener} is {@code null}
36      */
37     @NonNull Registration registerSchemaContextListener(EffectiveModelContextListener listener);
38 }