/** * Constructor that allows injection of JNA interfaces * * @param wEvtApi event api interface * @param kernel32 kernel interface */ public ConsumeWindowsEventLog(WEvtApi wEvtApi, Kernel32 kernel32) { this.wEvtApi = wEvtApi == null ? loadWEvtApi() : wEvtApi; this.kernel32 = kernel32 == null ? loadKernel32() : kernel32; this.errorLookup = new ErrorLookup(this.kernel32); if (this.kernel32 != null) { name = Kernel32Util.getComputerName(); } else { // Won't be able to use the processor anyway because native libraries didn't load name = null; } }
/** * Constructor that allows injection of JNA interfaces * * @param wEvtApi event api interface * @param kernel32 kernel interface */ public ConsumeWindowsEventLog(WEvtApi wEvtApi, Kernel32 kernel32) { this.wEvtApi = wEvtApi == null ? loadWEvtApi() : wEvtApi; this.kernel32 = kernel32 == null ? loadKernel32() : kernel32; this.errorLookup = new ErrorLookup(this.kernel32); if (this.kernel32 != null) { name = Kernel32Util.getComputerName(); } else { // Won't be able to use the processor anyway because native libraries didn't load name = null; } }