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.
 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 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

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


getOutputStream

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


write

public 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

begin

public 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

public 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

setWriterPlugin

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


getWriterPlugin

public WriterPlugin getWriterPlugin()
Get the writer plugin.