com.timeindexing.plugin
Interface OutputPlugin

All Known Implementing Classes:
DefaultOutputPlugin

public interface OutputPlugin

An interface for output plugins.


Method Summary
 java.lang.Object begin()
          Called as the first thing of doOutput().
 java.lang.Object end()
          Called as the last thing of doOutput(), just before it returns.
 long flush()
          Flush out any remainig data.
 Index getIndex()
          Get the index we are doing output for.
 java.io.OutputStream getOutputStream()
          Get the OutputStream for the OutputPlugin.
 WriterPlugin getWriterPlugin()
          Get the writer plugin.
 OutputPlugin setContext(Index index, java.io.OutputStream outStream)
          Set the context for the OutputPlugin, which is the Index we are going output for, and the OutputStream that is being written to.
 OutputPlugin setWriterPlugin(WriterPlugin writer)
          Set a writer plugin, to read input from the InputStream.
 long write(IndexItem item, IndexProperties properties)
          Do some output.
 

Method Detail

getIndex

Index getIndex()
Get the index we are doing output for.


getOutputStream

java.io.OutputStream getOutputStream()
Get the OutputStream for the OutputPlugin.


setContext

OutputPlugin setContext(Index index,
                        java.io.OutputStream outStream)
Set the context for the OutputPlugin, which is the Index we are going output for, and the OutputStream that is being written to.


setWriterPlugin

OutputPlugin setWriterPlugin(WriterPlugin writer)
Set a writer plugin, to read input from the InputStream.


getWriterPlugin

WriterPlugin getWriterPlugin()
Get the writer plugin.


write

long write(IndexItem item,
           IndexProperties properties)
           throws java.io.IOException
Do some output.

Parameters:
item - The IndexItem to putput
properties - Some IndexProperties
Returns:
the number of byte written
Throws:
java.io.IOException

flush

long flush()
           throws java.io.IOException
Flush out any remainig data.

Throws:
java.io.IOException

begin

java.lang.Object begin()
                       throws java.io.IOException
Called as the first thing of doOutput(). Useful for doing any processing before output starts.

Throws:
java.io.IOException

end

java.lang.Object end()
                     throws java.io.IOException
Called as the last thing of doOutput(), just before it returns. Useful for doing any processing after output has finished.

Throws:
java.io.IOException


Timeindexing 2008