use of nokogiri.internals.NokogiriBlockingQueueInputStream in project nokogiri by sparklemotion.
the class XmlSaxPushParser method initialize_task.
private void initialize_task(ThreadContext context) throws IOException {
if (futureTask == null || stream == null) {
stream = new NokogiriBlockingQueueInputStream();
parserTask = new ParserTask(context, saxParser);
futureTask = new FutureTask<XmlSaxParserContext>(parserTask);
executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("XmlSaxPushParser");
t.setDaemon(true);
return t;
}
});
executor.submit(futureTask);
}
}
use of nokogiri.internals.NokogiriBlockingQueueInputStream in project gocd by gocd.
the class XmlSaxPushParser method initialize_task.
private void initialize_task(ThreadContext context) throws IOException {
if (futureTask == null || stream == null) {
stream = new NokogiriBlockingQueueInputStream();
parserTask = new ParserTask(context, saxParser);
futureTask = new FutureTask<XmlSaxParserContext>(parserTask);
executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("XmlSaxPushParser");
t.setDaemon(true);
return t;
}
});
executor.submit(futureTask);
}
}
use of nokogiri.internals.NokogiriBlockingQueueInputStream in project gocd by gocd.
the class HtmlSaxPushParser method initialize_task.
private void initialize_task(ThreadContext context) throws IOException {
if (futureTask == null || stream == null) {
stream = new NokogiriBlockingQueueInputStream();
parserTask = new ParserTask(context, saxParser);
futureTask = new FutureTask<HtmlSaxParserContext>(parserTask);
executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("HtmlSaxPushParser");
t.setDaemon(true);
return t;
}
});
executor.submit(futureTask);
}
}
use of nokogiri.internals.NokogiriBlockingQueueInputStream in project nokogiri by sparklemotion.
the class HtmlSaxPushParser method initialize_task.
private void initialize_task(ThreadContext context) throws IOException {
if (futureTask == null || stream == null) {
stream = new NokogiriBlockingQueueInputStream();
parserTask = new ParserTask(context, saxParser);
futureTask = new FutureTask<HtmlSaxParserContext>(parserTask);
executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("HtmlSaxPushParser");
t.setDaemon(true);
return t;
}
});
executor.submit(futureTask);
}
}
Aggregations