de.dante.extex.backend
Interface BackendDriver

All Known Implementing Classes:
BackendDriverImpl

public interface BackendDriver

This interface describes a back-end as extension to a DocumentWriter.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Method Summary
 void add(PagePipe processor)
          Adder for a processor.
 void close()
          This method is invoked upon the end of the processing.
 DocumentWriter getDocumentWriter()
          Getter for the document writer.
 java.lang.String getExtension()
          Getter for the extension associated with this kind of output.
 int getPages()
          Getter for the number of pages already produced.
 void setDocumentWriter(DocumentWriter docWriter)
          Setter for the document writer.
 int shipout(Page page)
          This is the entry point for the document writer.
 

Method Detail

add

public void add(PagePipe processor)
Adder for a processor.

Parameters:
processor - the processor to append

close

public void close()
           throws BackendException
This method is invoked upon the end of the processing.

Throws:
BackendException - in case of an error

getDocumentWriter

public DocumentWriter getDocumentWriter()
Getter for the document writer.

Returns:
the document writer

getExtension

public java.lang.String getExtension()
Getter for the extension associated with this kind of output. For instance pdf is the expected value for PDF files and dvi is the expected value for DVI files.

Returns:
the appropriate extension for file names

getPages

public int getPages()
Getter for the number of pages already produced.

Returns:
the number of pages already shipped out

setDocumentWriter

public void setDocumentWriter(DocumentWriter docWriter)
Setter for the document writer.

Parameters:
docWriter - the document writer

shipout

public int shipout(Page page)
            throws BackendException
This is the entry point for the document writer. Here it receives a complete node list to be sent to the output writer. It can be assumed that all values for width, height, and depth of the node lists are properly filled. Thus all information should be present to place the ink on the paper.

Parameters:
page - the page to send
Returns:
returns the number of pages shipped
Throws:
BackendException - in case of an error