use of org.kie.scanner.management.KieScannerMBeanImpl in project drools by kiegroup.
the class KieRepositoryScannerImpl method setKieContainer.
public synchronized void setKieContainer(KieContainer kieContainer) {
if (this.kieContainer != null) {
throw new RuntimeException("Cannot change KieContainer on an already initialized KieScanner");
}
this.kieContainer = (InternalKieContainer) kieContainer;
if (this.kieContainer.getContainerReleaseId() == null) {
throw new RuntimeException("The KieContainer's ReleaseId cannot be null. Are you using a KieClasspathContainer?");
}
artifactResolver = getResolverFor(this.kieContainer, true);
kieProjectDescr = new DependencyDescriptor(this.kieContainer.getReleaseId(), this.kieContainer.getCreationTimestamp());
usedDependencies = indexArtifacts();
KieScannersRegistry.register(this);
changeStatus(Status.STOPPED);
if (MBeanUtils.isMBeanEnabled()) {
mbean = new KieScannerMBeanImpl(this);
}
}
Aggregations