BUG-139: PCEP capabilities refactor
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / PCEPDispatcher.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.pcep;
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 servers and clients.
16  */
17 public interface PCEPDispatcher {
18     /**
19      * Creates server. Each server needs three factories to pass their instances to client sessions.
20      *
21      * @param address to be bound with the server
22      * @param listenerFactory to create listeners for clients
23      * @param peerProposal information used in our Open message
24      * @return instance of PCEPServer
25      */
26     ChannelFuture createServer(InetSocketAddress address, PCEPSessionListenerFactory listenerFactory, final PCEPPeerProposal peerProposal);
27
28     /**
29      * Creates server. Each server needs three factories to pass their instances to client sessions.
30      *
31      * @param address to be bound with the server
32      * @param keys RFC2385 key mapping
33      * @param listenerFactory to create listeners for clients
34      * @param peerProposal information used in our Open message
35      * @return instance of PCEPServer
36      */
37     ChannelFuture createServer(InetSocketAddress address, KeyMapping keys, PCEPSessionListenerFactory listenerFactory, PCEPPeerProposal peerProposal);
38 }