public void submitOne(final R resource) throws Exception {
  lock.lock();
  try {
    final Callable<?> task=newParserTask(resource);
    submitOne(resource,task);
  }
  finally {
    lock.unlock();
  }
}

public void submitOne ( final R resource ) throws Exception { lock . lock ( ) ; try { final Callable < ? > task = newParserTask ( resource ) ; submitOne ( resource , task ) ; } finally { lock . unlock ( ) ; } }
submit a resource for processing .
