2 * Copyright (c) 2022 PANTHEON.tech, 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
8 package org.opendaylight.netconf.transport.api;
10 import org.eclipse.jdt.annotation.NonNull;
13 * Transport-level channel event listener.
15 public interface TransportChannelListener {
17 * Invoked when a {@link TransportChannel} is established. Implementations of this method are expected to attach
18 * to validate the channel and connect it to the messages layer.
20 * @param channel Established channel
22 void onTransportChannelEstablished(@NonNull TransportChannel channel);
25 * Invoked when a {@link TransportChannel} could not be established. Implementations of this method are expected
26 * to react to this failure at least by logging it.
28 * @param cause Failure cause
30 void onTransportChannelFailed(@NonNull Throwable cause);