Do not use ListenerRegistration in DOMSchemaService
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMMountPointService.java
1 /*
2  * Copyright (c) 2014 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
9 package org.opendaylight.mdsal.dom.api;
10
11 import java.util.Optional;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13 import org.opendaylight.yangtools.concepts.ObjectRegistration;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15
16 public interface DOMMountPointService extends DOMService {
17
18     Optional<DOMMountPoint> getMountPoint(YangInstanceIdentifier path);
19
20     DOMMountPointBuilder createMountPoint(YangInstanceIdentifier path);
21
22     ListenerRegistration<DOMMountPointListener> registerProvisionListener(DOMMountPointListener listener);
23
24     interface DOMMountPointBuilder {
25
26         <T extends DOMService> DOMMountPointBuilder addService(Class<T> type,T impl);
27
28         ObjectRegistration<DOMMountPoint> register();
29     }
30 }