BUG-55: make sure session initialization asynchronous
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / BGPDispatcher.java
index 92b2768db48f98e077bc540ecad74c77b97ecc55..6755f392db6fe32ede5df9d91ec9431d61c4fa62 100644 (file)
@@ -7,11 +7,12 @@
  */
 package org.opendaylight.protocol.bgp.rib.impl.spi;
 
+import io.netty.util.concurrent.Future;
+
 import java.io.IOException;
 
-import org.opendaylight.protocol.bgp.parser.BGPMessageParser;
 import org.opendaylight.protocol.bgp.parser.BGPSession;
-
+import org.opendaylight.protocol.framework.ProtocolMessageFactory;
 
 /**
  * Dispatcher class for creating BGP clients.
@@ -26,5 +27,5 @@ public interface BGPDispatcher {
         * @return client session
         * @throws IOException
         */
-       BGPSession createClient(BGPConnection connection, BGPMessageParser parser) throws IOException;
+       Future<? extends BGPSession> createClient(BGPConnection connection, ProtocolMessageFactory parser) throws IOException;
 }