Get rid of JSR305 annotations
[bgpcep.git] / bmp / bmp-spi / src / main / java / org / opendaylight / protocol / bmp / api / BmpDispatcher.java
1 /*
2  * Copyright (c) 2015 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.bmp.api;
9
10 import io.netty.channel.ChannelFuture;
11 import java.net.InetSocketAddress;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.protocol.concepts.KeyMapping;
14
15 /**
16  * Dispatcher class for creating servers and clients.
17  */
18 @NonNullByDefault
19 public interface BmpDispatcher extends AutoCloseable {
20     /**
21      * Creates server. Each server needs three factories to pass their instances to client sessions.
22      *
23      * @param address to be bound with the server
24      * @param slf     bmp session listener factory
25      * @param keys    RFC2385 key mapping
26      * @return instance of BmpServer
27      */
28     ChannelFuture createServer(InetSocketAddress address, BmpSessionListenerFactory slf, KeyMapping keys);
29
30     /**
31      * Creates reconnect clients. Make connection to all active monitored-routers.
32      *
33      * @param address bmp client to connect to
34      * @param slf     bmp session listener factory
35      * @param keys    RFC2385 key mapping
36      * @return void
37      */
38     ChannelFuture createClient(InetSocketAddress address, BmpSessionListenerFactory slf, KeyMapping keys);
39 }