c2977140aaaca6226958a1455ed6b4c5afe18fb2
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / BGPServerDispatcher.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.channel.ChannelFuture;
11 import java.net.InetSocketAddress;
12 import org.opendaylight.tcpmd5.api.KeyMapping;
13
14 /**
15  * Dispatcher class for creating BGP server.
16  */
17 public interface BGPServerDispatcher {
18
19     /**
20      * Create new BGP server to accept incoming bgp connections (bound to provided socket address).
21      *
22      * @param peerRegistry BGP peer registry
23      * @param address server address
24      * @return ChannelFuture promising a server session
25      */
26     ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address);
27
28     /**
29      * Create new BGP server to accept incoming bgp connections (bound to provided socket address).
30      *
31      * @param peerRegistry BGP peer registry
32      * @param address server address
33      * @param keys KeyMapping
34      * @return ChannelFuture promising a server session
35      */
36     ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address, KeyMapping keys);
37 }