2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.mdsal.binding.javav2.api;
11 import com.google.common.annotations.Beta;
12 import com.google.common.base.Optional;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
17 * A {@link BindingService} providing access to mount point.
20 public interface MountPointService extends BindingService {
23 * Returns optional of mount point at given path represented by instance identifier.
24 * @param mountPoint mount point instance identifier
25 * @return optional of mount point
27 Optional<MountPoint> getMountPoint(InstanceIdentifier<?> mountPoint);
30 * Register a {@link MountPointListener} instance. Once registered, the listener will start
31 * receiving changes on the selected path.
33 * @param path given path to listen to changes
34 * @param listener {@link MountPointListener} that is being registered
35 * @param <T> listener type
36 * @return Listener registration object, which may be used to unregister
37 * your listener using {@link ListenerRegistration#close()} to stop
38 * delivery of mount point change events.
40 <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path, T listener);