com.rhi.architecture.parc.adapter.file
Class FlatFileOutputAdapter

java.lang.Object
  extended bycom.rhi.architecture.parc.adapter.AbstractOutputAdapter
      extended bycom.rhi.architecture.parc.adapter.file.FlatFileOutputAdapter
All Implemented Interfaces:
Adapter, OutputAdapter, java.lang.Runnable, SingleThreadModel

public class FlatFileOutputAdapter
extends AbstractOutputAdapter
implements SingleThreadModel

Flat File Output Adapter. Uses toString() method on Record to dump output to file.

Since:
1.0
Author:
Pete McKinstry

Field Summary
 
Fields inherited from interface com.rhi.architecture.parc.OutputAdapter
DEFAULT_THREAD_MODE, RUN_AS_THREAD, RUN_AS_THREAD_KEY
 
Constructor Summary
FlatFileOutputAdapter()
          Default Constructor.
 
Method Summary
 void cleanup()
          cleanup any resources.
protected  void handleErrorRecords(java.util.Collection c, Transaction t)
          General Case implementation for persisting error records.
 java.util.Collection handleValidRecords(java.util.Collection c, Transaction t)
          Persist Valid Records - FlatFileOutputAdapter does not
 void init(java.util.Properties props)
          Initialize the Castor data binding facilities so that the doWrite() method is ready to go.
 
Methods inherited from class com.rhi.architecture.parc.adapter.AbstractOutputAdapter
close, completeBatch, createTransaction, flush, getAuditAgent, log, markComplete, run, setAuditAgent, setErrorChannel, setExceptionHandler, setValidChannel, write, writeErrorRecords, writeValidRecords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileOutputAdapter

public FlatFileOutputAdapter()
Default Constructor.

Since:
1.0
Method Detail

init

public void init(java.util.Properties props)
          throws InitializationException
Initialize the Castor data binding facilities so that the doWrite() method is ready to go.

Specified by:
init in interface OutputAdapter
Overrides:
init in class AbstractOutputAdapter
Parameters:
props -
Throws:
InitializationException

cleanup

public void cleanup()
cleanup any resources.

Specified by:
cleanup in interface OutputAdapter
Overrides:
cleanup in class AbstractOutputAdapter

handleValidRecords

public java.util.Collection handleValidRecords(java.util.Collection c,
                                               Transaction t)
                                        throws ProcessingException
Persist Valid Records - FlatFileOutputAdapter does not

Specified by:
handleValidRecords in class AbstractOutputAdapter
Parameters:
c - - valid records
t - - the transaction to use in committing the records.
Returns:
Collection - any records failing during persistence.
Throws:
ProcessingException
Since:
1.0

handleErrorRecords

protected void handleErrorRecords(java.util.Collection c,
                                  Transaction t)
                           throws ProcessingException
General Case implementation for persisting error records.

Specified by:
handleErrorRecords in class AbstractOutputAdapter
Parameters:
c - - errored records
t - - the transaction to use in committing the records.
Throws:
ProcessingException
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.