All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.lontime.extcopper.provider.Provider Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.github.lontime.extcopper.provider;

import com.github.lontime.base.commonj.components.ComponentLifecycle;
import com.github.lontime.extcopper.common.ProcessingEngineWrapper;
import com.github.lontime.extcopper.container.EngineContainer;
import org.copperengine.core.DependencyInjector;
import org.copperengine.core.audit.BatchingAuditTrail;
import org.copperengine.core.audit.ScottyAuditTrailQueryEngine;

/**
 * Provider.
 * @author lontime
 * @since 1.0
 */
public interface Provider extends AutoCloseable, ComponentLifecycle {

    /**
     * setDependencyInjector.
     * @param dependencyInjector dependencyInjector
     */
    void withDependencyInjector(DependencyInjector dependencyInjector);

    /**
     * getTransientProcessingEngine.
     * @return ProcessingEngine
     */
    default ProcessingEngineWrapper getTransientProcessingEngine() {
        return getProcessingEngine(EngineContainer.DEFAULT_TRANSIENT_ENGINE_NAME);
    }

    /**
     * getTransientProcessingEngine.
     * @return ProcessingEngine
     */
    default ProcessingEngineWrapper getPesistentProcessingEngine() {
        return getProcessingEngine(EngineContainer.DEFAULT_PERSISTENT_ENGINE_NAME);
    }

    /**
     * getProcessingEngine.
     * @param name name
     * @return ProcessingEngine
     */
    ProcessingEngineWrapper getProcessingEngine(String name);


    /**
     * getBatchingAuditTrail.
     * @return BatchingAuditTrail
     */
    default BatchingAuditTrail getBatchingAuditTrail() {
        return null;
    }

    /**
     * getAuditTrailQueryEngine.
     * @return ScottyAuditTrailQueryEngine
     */
    default ScottyAuditTrailQueryEngine getAuditTrailQueryEngine() {
        return null;
    }

    /**
     * close.
     */
    @Override
    void close();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy