Search in sources :

Example 1 with ClassLoaderDiagnosticsDTO

use of org.apache.nifi.web.api.dto.diagnostics.ClassLoaderDiagnosticsDTO in project nifi by apache.

the class DtoFactory method createClassLoaderDiagnosticsDto.

private ClassLoaderDiagnosticsDTO createClassLoaderDiagnosticsDto(final ClassLoader classLoader) {
    final ClassLoaderDiagnosticsDTO dto = new ClassLoaderDiagnosticsDTO();
    final Bundle bundle = ExtensionManager.getBundle(classLoader);
    if (bundle != null) {
        dto.setBundle(createBundleDto(bundle.getBundleDetails().getCoordinate()));
    }
    final ClassLoader parentClassLoader = classLoader.getParent();
    if (parentClassLoader != null) {
        dto.setParentClassLoader(createClassLoaderDiagnosticsDto(parentClassLoader));
    }
    return dto;
}
Also used : Bundle(org.apache.nifi.bundle.Bundle) ClassLoaderDiagnosticsDTO(org.apache.nifi.web.api.dto.diagnostics.ClassLoaderDiagnosticsDTO)

Aggregations

Bundle (org.apache.nifi.bundle.Bundle)1 ClassLoaderDiagnosticsDTO (org.apache.nifi.web.api.dto.diagnostics.ClassLoaderDiagnosticsDTO)1