52c2a1e4ac371ee6baa23673d34b1fb290e8bd68
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / PCEPSessionNegotiatorFactory.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.pcep;
9
10 import io.netty.channel.Channel;
11 import io.netty.util.concurrent.Promise;
12 import javax.annotation.Nonnull;
13
14 /**
15  * Factory for creating PCEP session negotiator.
16  *
17  * @param <S>
18  */
19 public interface PCEPSessionNegotiatorFactory<S extends PCEPSession> {
20
21     /**
22      * Creates PCEPSessionNegotiator instance for income attributes.
23      *
24      * @param sessionNegotiatorDependencies contains PCEPSessionNegotiator dependencies
25      * @param channel                       session channel
26      * @param promise                       session promise
27      * @return PCEPSessionNegotiator instance
28      */
29     @Nonnull
30     SessionNegotiator getSessionNegotiator(
31             @Nonnull PCEPSessionNegotiatorFactoryDependencies sessionNegotiatorDependencies,
32             @Nonnull Channel channel,
33             @Nonnull Promise<S> promise);
34
35     /**
36      * Returns a PCEPSessionProposalFactory
37      *
38      * @return session factory
39      */
40     @Nonnull
41     PCEPSessionProposalFactory getPCEPSessionProposalFactory();
42 }