|
XCC/J 4.1-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.marklogic.xcc.examples.OutputStreamInserter.DocBuilder
public static class OutputStreamInserter.DocBuilder
A simple dummy content generator which writes to an OutputStream. This is a
brain-dead example that simply generates dummy content. A real implementation might be
fetching rows from an SQL database or some other transient source. You should only use this
approach if you don't have a better option. If the data can be written to a temp file or
provided as a standard InputStream then one of the provided implementations
in ContentFactory should be used. Note also that inserting content
this way is not eligible for automatic error recovery and you can get in trouble if you don't
manage threads properly.
| Constructor Summary | |
|---|---|
OutputStreamInserter.DocBuilder(OutputStream out,
int lines)
Initialize this instance. |
|
| Method Summary | |
|---|---|
void |
run()
Entry point when the new Thread starts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputStreamInserter.DocBuilder(OutputStream out,
int lines)
out - An OutputStream to which content should be written.lines - How many lines to generate.| Method Detail |
|---|
public void run()
Thread starts. This is where your real business logic
would go, ulitmately writing data to the OutputStream.
run in interface Runnable
|
XCC/J 4.1-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com