Sautrela

edu.gtts.sautrela.engine
Class Engine

java.lang.Object
  extended by edu.gtts.sautrela.engine.Engine

public class Engine
extends java.lang.Object

Author:
mpenagar

Field Summary
static boolean DEFAULT_BUFFER_BLOCKING
          The default buffer-blocking policy == true
static int DEFAULT_BUFFER_SIZE
          The default buffer size == 10
 
Constructor Summary
Engine()
           
Engine(boolean trace)
          Creates an empty Engine.
Engine(org.xml.sax.InputSource is)
           
Engine(org.xml.sax.InputSource is, java.util.Map<java.lang.String,java.lang.String> options)
           
Engine(org.xml.sax.InputSource is, java.util.Map<java.lang.String,java.lang.String> options, boolean help, boolean trace)
           
 
Method Summary
 void add(DataProcessor dp, Buffer out)
           
 Buffer getBuffer(int i)
          Returns a Buffer of this Engine.
 DataProcessor getDataProcessor(int i)
          Returns a Dataprocessor of this Engine.
 java.lang.String getName()
          Returns the name of this Engine.
 void join()
          Waits for all threads to die.
 void setName(java.lang.String name)
          Sets the name of this Engine.
 void start()
          Starts the engine.
 java.lang.String toXML()
          Returns a XML representation of the Engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static int DEFAULT_BUFFER_SIZE
The default buffer size == 10


DEFAULT_BUFFER_BLOCKING

public static boolean DEFAULT_BUFFER_BLOCKING
The default buffer-blocking policy == true

Constructor Detail

Engine

public Engine()

Engine

public Engine(boolean trace)
Creates an empty Engine.


Engine

public Engine(org.xml.sax.InputSource is)
       throws javax.xml.parsers.ParserConfigurationException,
              org.xml.sax.SAXException,
              java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

Engine

public Engine(org.xml.sax.InputSource is,
              java.util.Map<java.lang.String,java.lang.String> options)
       throws javax.xml.parsers.ParserConfigurationException,
              org.xml.sax.SAXException,
              java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

Engine

public Engine(org.xml.sax.InputSource is,
              java.util.Map<java.lang.String,java.lang.String> options,
              boolean help,
              boolean trace)
       throws javax.xml.parsers.ParserConfigurationException,
              org.xml.sax.SAXException,
              java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Method Detail

getName

public java.lang.String getName()
Returns the name of this Engine.

Returns:
the name of the engine

setName

public void setName(java.lang.String name)
Sets the name of this Engine.

Parameters:
name - the name of the engine

add

public void add(DataProcessor dp,
                Buffer out)

start

public void start()
Starts the engine. Each linked DataProcessor runs on a separate Thread.


join

public void join()
          throws java.lang.InterruptedException
Waits for all threads to die.

Throws:
java.lang.InterruptedException

getDataProcessor

public DataProcessor getDataProcessor(int i)
Returns a Dataprocessor of this Engine.

Returns:
the selected DataProcessor of the engine

getBuffer

public Buffer getBuffer(int i)
Returns a Buffer of this Engine.

Returns:
the selected Buffer of the engine

toXML

public java.lang.String toXML()
Returns a XML representation of the Engine


Sautrela