|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rhi.architecture.parc.adapter.AbstractInputAdapter
The InputAdapter is responsible for creating the work set that the pipeline will execute on. Common implementations will load records from either a file or from the database.
Constructor Summary | |
AbstractInputAdapter()
Default contstructor |
Method Summary | |
void |
addToErrorChannel(Record record)
The concrete input adapter can use this method to add error records to the error channel while maintaining the correct audit entries for valid (returned from loadBatch() & pushed into the normal pipeline channel) & errors (added by calling addError() & pushed into the error channel. |
void |
cleanup()
No-op cleanup method. |
AuditAgent |
getAuditAgent()
get audit agent |
protected java.util.Collection |
getErrors()
get errors |
void |
init(java.util.Properties props)
No-op init() method. |
protected abstract java.util.Collection |
loadBatch()
Retrieve the batch. |
int |
push(Channel validChannel)
Push a set of records into the pipeline. |
void |
setAuditAgent(AuditAgent agent)
Set method to tell the InputAdapter what audit agent to use. |
void |
setErrorChannel(Channel errorChannel)
set the error channel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractInputAdapter()
Method Detail |
public final void setAuditAgent(AuditAgent agent)
setAuditAgent
in interface Adapter
agent
- public final AuditAgent getAuditAgent()
getAuditAgent
in interface Adapter
public void init(java.util.Properties props) throws InitializationException
init
in interface Adapter
props
-
InitializationException
public void cleanup()
cleanup
in interface Adapter
public int push(Channel validChannel) throws ProcessingException
push
in interface InputAdapter
validChannel
- inbound side of the pipe.
ProcessingException
protected abstract java.util.Collection loadBatch() throws ProcessingException
ProcessingException
public void setErrorChannel(Channel errorChannel)
This method can be used by input adapters in cases where they have parsing errors or other non-fatal record level errors when loading a batch of records.
setErrorChannel
in interface InputAdapter
errorChannel
- protected java.util.Collection getErrors()
public final void addToErrorChannel(Record record)
addToErrorChannel
in interface InputAdapter
record
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |