org.mmbase.applications.xmlimporter
Class TransactionHandler

java.lang.Object
  extended by org.mmbase.util.functions.FunctionProvider
      extended by org.mmbase.util.functions.DescribedFunctionProvider
          extended by org.mmbase.module.Module
              extended by org.mmbase.applications.xmlimporter.TransactionHandler
All Implemented Interfaces:
Descriptor

public class TransactionHandler
extends Module

This class parses the TML code and calls the appropriate methods in TransactionManager TemporarayNodeManager org.mmabse.module.core Furthermore is does some nameserving.

Since:
MMBase-1.5
Version:
$Id: TransactionHandler.java 35335 2009-05-21 08:14:41Z michiel $
Author:
John Balder: 3MPS, Rob Vermeulen: VPRO, Rob van Maris: Finnalist IT Group, Erik Visser: Finnalist IT Group

Field Summary
 
Fields inherited from class org.mmbase.module.Module
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIME
 
Fields inherited from class org.mmbase.util.functions.DescribedFunctionProvider
description, guiName, name
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
TransactionHandler()
          Create new TransactionHandler.
 
Method Summary
(package private)  void checkKey(String key)
          Performs JB key test.
 void handleTransaction(Reader input, Consultant consultant)
          parses transactions xml file delivered by the reader and executes the TCP commands.
 void handleTransactionAsynchronously(Reader input, Consultant consultant)
          starts handleTransaction(java.io.Reader input) in a seperate thread
 void init()
          Initialize the transactionhandler module.
 void onload()
          This method is called on loading of the transactionhandler module and writes a log entry that the TransactionHandler is loaded.
 
Methods inherited from class org.mmbase.module.Module
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdown, shutdownModules, startModule, startModules
 
Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHandler

public TransactionHandler()
Create new TransactionHandler.

Method Detail

onload

public void onload()
This method is called on loading of the transactionhandler module and writes a log entry that the TransactionHandler is loaded.

Overrides:
onload in class Module

init

public void init()
Initialize the transactionhandler module.

Overrides:
init in class Module

handleTransactionAsynchronously

public void handleTransactionAsynchronously(Reader input,
                                            Consultant consultant)
starts handleTransaction(java.io.Reader input) in a seperate thread

Parameters:
input - input
consultant - The intermediate import object. Used to set and get status from and set and get objects to and from.

handleTransaction

public void handleTransaction(Reader input,
                              Consultant consultant)
parses transactions xml file delivered by the reader and executes the TCP commands.

Parameters:
input - the connection to the input source
consultant - The intermediate import object. Used to set and get status from and set and get objects to and from.

checkKey

void checkKey(String key)
        throws TransactionHandlerException
Performs JB key test. Compares key with TransactionHandler keycode, logs message and throws exception when key rejected, depending on TransactionHandler security mode.

Parameters:
key - The key provided with the transactions.
Throws:
TransactionHandlerException - When the key is rejected, while in secure mode.


MMBase 2.0-SNAPSHOT - null