* Factory for creating PCEP session negotiator.
*/
public interface PCEPSessionNegotiatorFactory {
-
/**
* Creates PCEPSessionNegotiator instance for income attributes.
*
@NonNull SessionNegotiator getSessionNegotiator(
@NonNull PCEPSessionNegotiatorFactoryDependencies sessionNegotiatorDependencies,
@NonNull Channel channel, @NonNull Promise<PCEPSession> promise);
-
- /**
- * Returns a PCEPSessionProposalFactory.
- *
- * @return session factory
- */
- @NonNull PCEPSessionProposalFactory getPCEPSessionProposalFactory();
}
import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.protocol.pcep.PCEPDispatcher;
import org.opendaylight.protocol.pcep.PCEPSessionNegotiatorFactory;
+import org.opendaylight.protocol.pcep.PCEPSessionProposalFactory;
/**
* Provides required dependencies for PCEPTopologyProviderProvider instantiation.
*/
@NonNullByDefault
interface PCEPTopologyProviderDependencies {
+ /**
+ * Returns a PCEPSessionProposalFactory.
+ *
+ * @return session factory
+ */
+ PCEPSessionProposalFactory getPCEPSessionProposalFactory();
+
/**
* PCEP Session Negotiator Factory.
*
import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
import org.opendaylight.protocol.pcep.PCEPDispatcher;
import org.opendaylight.protocol.pcep.PCEPSessionNegotiatorFactory;
+import org.opendaylight.protocol.pcep.PCEPSessionProposalFactory;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.topology.stats.rpc.rev190321.PcepTopologyStatsRpcService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.TopologyTypes1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.topology.pcep.type.TopologyPcep;
final @NonNull InstructionSchedulerFactory instructionSchedulerFactory;
final @NonNull ClusterSingletonServiceProvider singletonService;
private final @NonNull PCEPSessionNegotiatorFactory sessionNegotiatorFactory;
+ private final @NonNull PCEPSessionProposalFactory sessionProposalFactory;
private final @NonNull RpcProviderService rpcProviderRegistry;
private final @NonNull PceServerProvider pceServerProvider;
private final @NonNull PCEPDispatcher pcepDispatcher;
private Registration statsReg;
public PCEPTopologyTracker(final DataBroker dataBroker, final ClusterSingletonServiceProvider singletonService,
- final RpcProviderService rpcProviderRegistry, final PCEPSessionNegotiatorFactory sessionNegotiatorFactory,
+ final RpcProviderService rpcProviderRegistry, final PCEPSessionProposalFactory sessionProposalFactory,
+ final PCEPSessionNegotiatorFactory sessionNegotiatorFactory,
final PCEPDispatcher pcepDispatcher, final InstructionSchedulerFactory instructionSchedulerFactory,
final PceServerProvider pceServerProvider) {
this.dataBroker = requireNonNull(dataBroker);
this.singletonService = requireNonNull(singletonService);
this.rpcProviderRegistry = requireNonNull(rpcProviderRegistry);
+ this.sessionProposalFactory = requireNonNull(sessionProposalFactory);
this.sessionNegotiatorFactory = requireNonNull(sessionNegotiatorFactory);
this.pcepDispatcher = requireNonNull(pcepDispatcher);
this.instructionSchedulerFactory = requireNonNull(instructionSchedulerFactory);
LOG.info("PCEP Topology tracker initialized");
}
+ @Override
+ public PCEPSessionProposalFactory getPCEPSessionProposalFactory() {
+ return sessionProposalFactory;
+ }
+
@Override
public PCEPSessionNegotiatorFactory getPCEPSessionNegotiatorFactory() {
return sessionNegotiatorFactory;
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
<reference id="rpcProviderService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
+ <reference id="sessionProposalFactory" interface="org.opendaylight.protocol.pcep.PCEPSessionProposalFactory"/>
<reference id="sessionNegotiatorFactory" interface="org.opendaylight.protocol.pcep.PCEPSessionNegotiatorFactory"/>
<reference id="pcepDispatcher" interface="org.opendaylight.protocol.pcep.PCEPDispatcher"/>
<reference id="clusterSingletonServiceProvider"
<argument ref="dataBroker"/>
<argument ref="clusterSingletonServiceProvider"/>
<argument ref="rpcProviderService"/>
+ <argument ref="sessionProposalFactory"/>
<argument ref="sessionNegotiatorFactory"/>
<argument ref="pcepDispatcher"/>
<argument ref="intructionFactory"/>