public abstract class ImportTask extends Object
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.Multimap<String,Reader> |
readers |
| Constructor and Description |
|---|
ImportTask() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
configure()
Configure the input sources using the various
input methods. |
boolean |
handle(ClassNotFoundException e)
Provide
ClassNotFoundException handler. |
boolean |
handle(ImportException e)
Provide import error handler.
|
boolean |
handle(IOException e)
Provide
IOException handler. |
void |
input(String inputName,
File source)
Provide the input source.
|
void |
input(String inputName,
File source,
Charset charset)
Provide the input source.
|
void |
input(String inputName,
InputStream source)
Provide the input source.
|
void |
input(String inputName,
InputStream source,
Charset charset)
Provide the input source.
|
void |
input(String inputName,
Reader reader)
Provide the input source.
|
public abstract void configure()
throws IOException
input methods.IOException - if unable to read configurationinput(String, File),
input(String, File, Charset),
input(String, InputStream),
input(String, InputStream, Charset),
input(String, Reader)public boolean handle(ImportException e)
e - the error causetrue to continue else terminate the task immediately.public boolean handle(IOException e)
IOException handler.e - the error causetrue to continue else terminate the task immediately.public boolean handle(ClassNotFoundException e)
ClassNotFoundException handler.e - the error causetrue to continue else terminate the task immediately.public void input(String inputName, File source) throws FileNotFoundException
inputName - the input namesource - the input sourceFileNotFoundException - if source file doesn't existpublic void input(String inputName, File source, Charset charset) throws FileNotFoundException
inputName - the input namesource - the input sourcecharset - the source encodingFileNotFoundException - if source file doesn't existpublic void input(String inputName, InputStream source)
inputName - the input namesource - the input sourcepublic void input(String inputName, InputStream source, Charset charset)
inputName - the input namesource - the input sourcecharset - the source encoding