ExecNioSource extends EventSource.Base { public static SourceBuilder builder() { return new Builder(); } ExecNioSource(String command, boolean aggregate, boolean restart, int period); void close(); Event next(); void open(); static SourceBuilder buildPeriodic(); static SourceBuilder buildStream(); static SourceBuilder builder(); static final String A_PROC_SOURCE; static final String A_EXEC_CMD; }
@Test public void testExecBuilder() throws IOException, FlumeSpecException { ExecNioSource e = (ExecNioSource) ExecNioSource.builder().build("ps -aux", "true", "true", "1000"); assertEquals(e.inAggregateMode, true); assertEquals(e.command, "ps -aux"); assertEquals(e.restart, true); assertEquals(e.period, 1000); }