Use switch expression in FramingMechanismHandlerFactory
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / ReconnectFuture.java
1 /*
2  * Copyright (c) 2021 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.netconf.nettyutil;
9
10 import com.google.common.annotations.Beta;
11 import io.netty.util.concurrent.Future;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.Empty;
14
15 /**
16  * A future representing the task of reconnecting of a certain channel. This future never completes successfully, it
17  * either fails when the underlying strategy gives up, or when it is cancelled. It additionally exposes an additional
18  * future, which completes when the session is established for the first time.
19  */
20 @Beta
21 public interface ReconnectFuture extends Future<Empty> {
22     /**
23      * Return a Future which completes when the first session is established.
24      *
25      * @return First session establishment future
26      */
27     @NonNull Future<?> firstSessionFuture();
28 }