4 * Generated from: yang module name: pcep-impl yang module local name: pcep-dispatcher-impl
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Nov 06 13:16:39 CET 2013
8 * Do not modify this file unless it is present under src/main directory
10 package org.opendaylight.controller.config.yang.pcep.impl;
12 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
13 import org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiatorFactory;
14 import org.opendaylight.protocol.pcep.impl.PCEPDispatcherImpl;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
20 public final class PCEPDispatcherImplModule
22 org.opendaylight.controller.config.yang.pcep.impl.AbstractPCEPDispatcherImplModule {
24 public PCEPDispatcherImplModule(
25 final org.opendaylight.controller.config.api.ModuleIdentifier name,
26 final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
27 super(name, dependencyResolver);
30 public PCEPDispatcherImplModule(
31 final org.opendaylight.controller.config.api.ModuleIdentifier name,
32 final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
33 final PCEPDispatcherImplModule oldModule,
34 final java.lang.AutoCloseable oldInstance) {
35 super(name, dependencyResolver, oldModule, oldInstance);
39 public void validate() {
41 JmxAttributeValidationException.checkNotNull(getMaxUnknownMessages(),
42 "value is not set.", this.maxUnknownMessagesJmxAttribute);
43 JmxAttributeValidationException.checkCondition(
44 getMaxUnknownMessages() > 0, "Parameter 'maxUnknownMessages' "
45 + "must be greater than 0",
46 this.maxUnknownMessagesJmxAttribute);
50 public java.lang.AutoCloseable createInstance() {
51 Open localPrefs = getPcepSessionProposalFactoryDependency()
52 .getSessionProposal(null, -1);
53 DefaultPCEPSessionNegotiatorFactory negFactory = new DefaultPCEPSessionNegotiatorFactory(
54 getTimerDependency(), localPrefs, getMaxUnknownMessages());
56 final PCEPDispatcherImpl instance = new PCEPDispatcherImpl(
57 getExtensionsDependency().getMessageHandlerRegistry(),
58 negFactory, getBossGroupDependency(), getWorkerGroupDependency());