xmlBlaster 2.2.0 contributions API

org.xmlBlaster.contrib.replication
Class ReplicationAgent

java.lang.Object
  extended by org.xmlBlaster.contrib.replication.ReplicationAgent
All Implemented Interfaces:
I_InitialUpdateListener

public class ReplicationAgent
extends java.lang.Object
implements I_InitialUpdateListener

Test basic functionality.

To run most of the tests you need to have a database (for example Postgres).

The connection configuration (url, password etc.) is configured as JVM property or in #createTest(I_Info, Map) and #setUpDbPool(I_Info)

Author:
Michele Laghi

Nested Class Summary
 class ReplicationAgent.OwnGlobalInfo
           
 
Field Summary
 
Fields inherited from interface org.xmlBlaster.contrib.replication.I_InitialUpdateListener
INITIAL_UPDATE_LISTENER_KEY
 
Constructor Summary
ReplicationAgent()
          Default ctor.
 
Method Summary
 I_Info createWriterInfo(GlobalInfo cfgInfo)
           
 I_ChangeListener getDbWatcher()
           
 DbWriter getDbWriter()
           
 void init(I_Info readerInfo, I_Info writerInfo)
          Initializes the necessary stuff (encapsulated DbWatcher and DbWriter) and starts the DbWriter.
 boolean isRunning()
           
static void main(java.lang.String[] args)
          Keys are the info objects and values are maps containing the used properties as key/value pairs.
 GlobalInfo prepare(java.lang.String[] args)
           
 void process(I_Info readerInfo, I_Info writerInfo)
           
 void registerForUpdates(I_Update registeredForUpdates)
           
 void shutdown()
           
 void startInitialUpdate()
           
 void stopInitialUpdate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationAgent

public ReplicationAgent()
Default ctor.

Method Detail

prepare

public GlobalInfo prepare(java.lang.String[] args)
                   throws java.lang.Exception
Throws:
java.lang.Exception

isRunning

public boolean isRunning()

main

public static void main(java.lang.String[] args)
Keys are the info objects and values are maps containing the used properties as key/value pairs.


getDbWatcher

public I_ChangeListener getDbWatcher()

getDbWriter

public DbWriter getDbWriter()

createWriterInfo

public I_Info createWriterInfo(GlobalInfo cfgInfo)
                        throws java.lang.Exception
Throws:
java.lang.Exception

init

public void init(I_Info readerInfo,
                 I_Info writerInfo)
          throws java.lang.Exception
Initializes the necessary stuff (encapsulated DbWatcher and DbWriter) and starts the DbWriter. Note that the DbWatcher is only started if used, i.e. if the readerInfo is not null.

Parameters:
readerInfo -
writerInfo -
Throws:
java.lang.Exception

startInitialUpdate

public void startInitialUpdate()
                        throws java.lang.Exception
Specified by:
startInitialUpdate in interface I_InitialUpdateListener
Throws:
java.lang.Exception

stopInitialUpdate

public void stopInitialUpdate()
                       throws java.lang.Exception
Specified by:
stopInitialUpdate in interface I_InitialUpdateListener
Throws:
java.lang.Exception

shutdown

public void shutdown()

process

public final void process(I_Info readerInfo,
                          I_Info writerInfo)
                   throws java.lang.Exception
Throws:
java.lang.Exception

registerForUpdates

public void registerForUpdates(I_Update registeredForUpdates)

xmlBlaster 2.2.0 contributions API

Copyright © 1999-2014 The xmlBlaster.org contributers.