AbstractNativeKeyAccessFactoryModule.java

/*
* Generated file
*
* Generated from: yang module name: odl-tcpmd5-jni-cfg yang module local name: native-key-access-factory
* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
* Generated at: Sun May 28 13:25:20 UTC 2017
*
* Do not modify this file unless it is present under src/main directory
*/
package org.opendaylight.controller.config.yang.tcpmd5.jni.cfg;
/**
* Service representing a way for accessing key informtion.
*/
@org.opendaylight.yangtools.yang.binding.annotations.ModuleQName(revision = "2014-04-27", name = "odl-tcpmd5-jni-cfg", namespace = "urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg")

@org.opendaylight.controller.config.api.annotations.Description(value="Service representing a way for accessing key informtion.")
public abstract class AbstractNativeKeyAccessFactoryModule extends org.opendaylight.controller.config.spi.AbstractModule<AbstractNativeKeyAccessFactoryModule> implements org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.NativeKeyAccessFactoryModuleMXBean,org.opendaylight.controller.config.yang.tcpmd5.cfg.KeyAccessFactoryServiceInterface {
    private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.AbstractNativeKeyAccessFactoryModule.class);

    //attributes start

    //attributes end

    public AbstractNativeKeyAccessFactoryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
        super(identifier, dependencyResolver);
    }

    public AbstractNativeKeyAccessFactoryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,AbstractNativeKeyAccessFactoryModule oldModule,java.lang.AutoCloseable oldInstance) {
        super(identifier, dependencyResolver, oldModule, oldInstance);
    }

    @Override
    public void validate() {

        customValidation();
    }

    protected void customValidation() {
    }

    protected final void resolveDependencies() {
    }

    public boolean canReuseInstance(AbstractNativeKeyAccessFactoryModule oldModule){
        // allow reusing of old instance if no parameters was changed
        return isSame(oldModule);
    }

    public java.lang.AutoCloseable reuseInstance(java.lang.AutoCloseable oldInstance){
        // implement if instance reuse should be supported. Override canReuseInstance to change the criteria.
        return oldInstance;
    }

    public boolean isSame(AbstractNativeKeyAccessFactoryModule other) {
        if (other == null) {
            throw new IllegalArgumentException("Parameter 'other' is null");
        }

        return true;
    }

    @Override
    public boolean equals(Object o) {
    if (this == o) { return true; }
    if (o == null || getClass() != o.getClass()) { return false; }
        AbstractNativeKeyAccessFactoryModule that = (AbstractNativeKeyAccessFactoryModule) o;
        return identifier.equals(that.identifier);
    }

    @Override
    public int hashCode() {
        return identifier.hashCode();
    }

    // getters and setters

    public org.slf4j.Logger getLogger() {
        return LOGGER;
    }

}