Convert ListenerRegistrationHelper into a component
[openflowplugin.git] / applications / forwardingrules-manager / src / main / java / org / opendaylight / openflowplugin / applications / frm / impl / ListenerRegistrationHelper.java
1 /*
2  * Copyright (c) 2024 PANTHEON.tech, s.r.o. 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.openflowplugin.applications.frm.impl;
9
10 import com.google.common.util.concurrent.ListenableFuture;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
13 import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
14 import org.opendaylight.yangtools.concepts.ObjectRegistration;
15 import org.opendaylight.yangtools.yang.binding.DataObject;
16
17 // Needed only for BluePrint coexistence
18 public interface ListenerRegistrationHelper {
19
20     <T extends DataObject> @NonNull ListenableFuture<ObjectRegistration<?>> checkedRegisterListener(
21         DataTreeIdentifier<T> treeId, ClusteredDataTreeChangeListener<T> listener);
22 }