@Test public void testLifecycle() throws Exception { JdbcConnection jdbcConn = configure(new JdbcConnection()); ServiceFromDatabase extractor = new ServiceFromDatabase().withQuery(SELECT_STMT); try { LifecycleHelper.initAndStart(extractor); fail(); } catch (Exception expected) { } finally { LifecycleHelper.stopAndClose(extractor); } extractor.setConnection(jdbcConn); try { LifecycleHelper.initAndStart(extractor); } finally { LifecycleHelper.stopAndClose(extractor); } }
public ServiceFromDatabase withQuery(String q) { setQuery(q); return this; }
ServiceFromDatabase extends ExtractorWithConnection { public ServiceFromDatabase withQuery(String q) { setQuery(q); return this; } }
ServiceFromDatabase extends ExtractorWithConnection { public ServiceFromDatabase withQuery(String q) { setQuery(q); return this; } ServiceFromDatabase(); }
ServiceFromDatabase extends ExtractorWithConnection { public ServiceFromDatabase withQuery(String q) { setQuery(q); return this; } ServiceFromDatabase(); @Override InputStream getInputStream(AdaptrisMessage m); String getQuery(); void setQuery(String query); ServiceFromDatabase withQuery(String q); }
ServiceFromDatabase extends ExtractorWithConnection { public ServiceFromDatabase withQuery(String q) { setQuery(q); return this; } ServiceFromDatabase(); @Override InputStream getInputStream(AdaptrisMessage m); String getQuery(); void setQuery(String query); ServiceFromDatabase withQuery(String q);  }