com.github.lontime.extcopper.provider.Provider Maven / Gradle / Ivy
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();
}