2 * Copyright (c) 2013 Cisco Systems, Inc. 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.nettyutil;
10 import io.netty.channel.Channel;
11 import io.netty.util.concurrent.Promise;
12 import org.opendaylight.netconf.api.NetconfSession;
13 import org.opendaylight.netconf.api.NetconfSessionListener;
14 import org.opendaylight.netconf.api.NetconfSessionListenerFactory;
17 * A factory class creating SessionNegotiators.
19 * @param <S> session type
22 public interface NetconfSessionNegotiatorFactory<S extends NetconfSession,
23 L extends NetconfSessionListener<? super S>> {
25 * Create a new negotiator attached to a channel, which will notify
26 * a promise once the negotiation completes.
28 * @param channel Underlying channel
29 * @param promise Promise to be notified
30 * @return new negotiator instance
32 NetconfSessionNegotiator<S> getSessionNegotiator(NetconfSessionListenerFactory<L> factory, Channel channel,