Do not use toString() in looging messages
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / NetconfSessionNegotiatorFactory.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. 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 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;
15
16 /**
17  * A factory class creating SessionNegotiators.
18  *
19  * @param <S> session type
20  */
21 @Deprecated
22 public interface NetconfSessionNegotiatorFactory<S extends NetconfSession,
23         L extends NetconfSessionListener<? super S>> {
24     /**
25      * Create a new negotiator attached to a channel, which will notify
26      * a promise once the negotiation completes.
27      *
28      * @param channel Underlying channel
29      * @param promise Promise to be notified
30      * @return new negotiator instance
31      */
32     NetconfSessionNegotiator<S> getSessionNegotiator(NetconfSessionListenerFactory<L> factory, Channel channel,
33             Promise<S> promise);
34 }