de.dante.extex.backend
Class BackendDriverImpl

java.lang.Object
  extended byde.dante.extex.backend.BackendDriverImpl
All Implemented Interfaces:
BackendDriver, Configurable, MultipleDocumentStream

public class BackendDriverImpl
extends java.lang.Object
implements BackendDriver, MultipleDocumentStream, Configurable

This back-end driver can be used to combine several components.

Version:
$Revision: 1.10 $
Author:
Gerd Neugebauer

Constructor Summary
BackendDriverImpl()
          Creates a new object.
 
Method Summary
 void add(PagePipe processor)
          Adder for a processor.
 void close()
          This method is invoked upon the end of the processing.
 void configure(Configuration config)
          Configure an object according to a given Configuration.
 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.
 void setOutputStreamFactory(OutputStreamFactory factory)
          Setter for the output stream.
 void setParameter(java.lang.String name, java.lang.String value)
           
 int shipout(Page page)
          This is the entry point for the document writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackendDriverImpl

public BackendDriverImpl()
Creates a new object.

Method Detail

add

public void add(PagePipe processor)
Description copied from interface: BackendDriver
Adder for a processor.

Specified by:
add in interface BackendDriver
Parameters:
processor - the processor to append
See Also:
BackendDriver.add( de.dante.extex.backend.pageFilter.PagePipe)

close

public void close()
           throws BackendException
Description copied from interface: BackendDriver
This method is invoked upon the end of the processing.

Specified by:
close in interface BackendDriver
Throws:
BackendException - in case of an error
See Also:
BackendDriver.close()

configure

public void configure(Configuration config)
               throws ConfigurationException
Description copied from interface: Configurable
Configure an object according to a given Configuration.

Specified by:
configure in interface Configurable
Parameters:
config - the configuration object to consider
Throws:
ConfigurationException - in case that something went wrong
See Also:
Configurable.configure( de.dante.util.framework.configuration.Configuration)

getDocumentWriter

public DocumentWriter getDocumentWriter()
Description copied from interface: BackendDriver
Getter for the document writer.

Specified by:
getDocumentWriter in interface BackendDriver
Returns:
the document writer
See Also:
BackendDriver.getDocumentWriter()

getExtension

public java.lang.String getExtension()
Description copied from interface: BackendDriver
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.

Specified by:
getExtension in interface BackendDriver
Returns:
the appropriate extension for file names
See Also:
DocumentWriter.getExtension()

getPages

public int getPages()
Description copied from interface: BackendDriver
Getter for the number of pages already produced.

Specified by:
getPages in interface BackendDriver
Returns:
the number of pages already shipped out
See Also:
BackendDriver.getPages()

setDocumentWriter

public void setDocumentWriter(DocumentWriter docWriter)
Description copied from interface: BackendDriver
Setter for the document writer.

Specified by:
setDocumentWriter in interface BackendDriver
Parameters:
docWriter - the document writer
See Also:
BackendDriver.setDocumentWriter( de.dante.extex.backend.documentWriter.DocumentWriter)

setOutputStreamFactory

public void setOutputStreamFactory(OutputStreamFactory factory)
Description copied from interface: MultipleDocumentStream
Setter for the output stream.

Specified by:
setOutputStreamFactory in interface MultipleDocumentStream
Parameters:
factory - the output stream
See Also:
MultipleDocumentStream.setOutputStreamFactory( de.dante.extex.backend.outputStream.OutputStreamFactory)

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
See Also:
DocumentWriter.setParameter( java.lang.String, java.lang.String)

shipout

public int shipout(Page page)
            throws BackendException
Description copied from interface: BackendDriver
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.

Specified by:
shipout in interface BackendDriver
Parameters:
page - the page to send
Returns:
returns the number of pages shipped
Throws:
BackendException - in case of an error
See Also:
BackendDriver.shipout( de.dante.extex.typesetter.type.page.Page)