2 * Copyright (c) 2013 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.pcep;
10 import io.netty.channel.ChannelFuture;
11 import java.net.InetSocketAddress;
12 import org.opendaylight.tcpmd5.api.KeyMapping;
15 * Dispatcher class for creating servers and clients.
17 public interface PCEPDispatcher {
19 * Creates server. Each server needs three factories to pass their instances to client sessions.
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
26 ChannelFuture createServer(InetSocketAddress address, PCEPSessionListenerFactory listenerFactory, final PCEPPeerProposal peerProposal);
29 * Creates server. Each server needs three factories to pass their instances to client sessions.
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
37 ChannelFuture createServer(InetSocketAddress address, KeyMapping keys, PCEPSessionListenerFactory listenerFactory, PCEPPeerProposal peerProposal);