BUG-58: refactor to take advantage of netty
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / BGPDispatcher.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.protocol.bgp.rib.impl.spi;
9
10 import io.netty.util.concurrent.Future;
11
12 import java.io.IOException;
13 import java.net.InetSocketAddress;
14
15 import org.opendaylight.protocol.bgp.parser.BGPSession;
16 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
17 import org.opendaylight.protocol.framework.ReconnectStrategy;
18
19 /**
20  * Dispatcher class for creating BGP clients.
21  */
22 public interface BGPDispatcher {
23
24         /**
25          * Creates BGP client.
26          * 
27          * @param connection attributes required for connection
28          * @param parser BGP message parser
29          * @return client session
30          * @throws IOException
31          */
32         Future<? extends BGPSession> createClient(InetSocketAddress address, BGPSessionPreferences preferences, BGPSessionListener listener, final ReconnectStrategy strategy);
33 }