2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.protocol.bmp.api;
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;
16 * Dispatcher class for creating servers and clients.
19 public interface BmpDispatcher extends AutoCloseable {
21 * Creates server. Each server needs three factories to pass their instances to client sessions.
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
28 ChannelFuture createServer(InetSocketAddress address, BmpSessionListenerFactory slf, KeyMapping keys);
31 * Creates reconnect clients. Make connection to all active monitored-routers.
33 * @param address bmp client to connect to
34 * @param slf bmp session listener factory
35 * @param keys RFC2385 key mapping
38 ChannelFuture createClient(InetSocketAddress address, BmpSessionListenerFactory slf, KeyMapping keys);