<commit_before>/*
 * $Log: IRecordHandlerManager.java,v $
 * Revision 1.5  2007-07-24 07:59:15  europe\L190409
 * update javadoc
 *
 * Revision 1.4  2006/05/19 09:28:38  <NAME> <<EMAIL>>
 * Restore java files from batch package after unwanted deletion.
 *
 * Revision 1.2  2005/10/31 14:38:03  <NAME> <<EMAIL>>
 * Add . in javadoc
 *
 * Revision 1.1  2005/10/11 13:00:22  <NAME> <<EMAIL>>
 * New ibis file related elements, such as DirectoryListener, MoveFilePie and 
 * BatchFileTransformerPipe
 *
 */
package nl.nn.adapterframework.batch;

import java.util.Collection;

import nl.nn.adapterframework.core.INamedObject;
import nl.nn.adapterframework.core.PipeLineSession;

/**
 * Interface for handling a transformed record.
 * 
 * A RecordHandlerManager decides, based on some implementation dependent algorithm, which record handler
 * is to be used to process a record. 
 * A record manager keeps a table of flow-elements, that each define a recordhandler, resulthandler and, 
 * optionally, a next-manager.
 * 
 * @author <NAME>
 */
public interface IRecordHandlerManager extends INamedObject {
	/**
	 * @return List of RecordHandlingFlow elements that this manager manages
	 */
	Collection getRecordHandlers();

	/**
	 * @param flow New flow to be added to the managed flow elements
	 */
	void addHandler(RecordHandlingFlow flow);
	
	/**
	 * @param record 
	 * @return the RecordHandlingFlow element to be used to handle the record
	 * @throws Exception
	 */
	RecordHandlingFlow getRecordHandler(PipeLineSession session, String record) throws Exception;
	
	/**
	 * @param filename
	 * @return the IRecordHandlingManager to be used initially based on the name of the input file 
	 */
	IRecordHandlerManager getRecordFactoryUsingFilename(PipeLineSession session, String filename);
	
	/**
	 * @param initialFactory inidicates if this manager is the initial manager
	 */<commit_msg>added configure()<commit_after>/*
 * $Log: IRecordHandlerManager.java,v $
 * Revision 1.6  2007-07-24 16:14:06  europe\L190409
 * added configure()
 *
 * Revision 1.5  2007/07/24 07:59:15  <NAME> <<EMAIL>>
 * update javadoc
 *
 * Revision 1.4  2006/05/19 09:28:38  <NAME> <<EMAIL>>
 * Restore java files from batch package after unwanted deletion.
 *
 * Revision 1.2  2005/10/31 14:38:03  <NAME> <<EMAIL>>
 * Add . in javadoc
 *
 * Revision 1.1  2005/10/11 13:00:22  <NAME> <<EMAIL>>
 * New ibis file related elements, such as DirectoryListener, MoveFilePie and 
 * BatchFileTransformerPipe
 *
 */
package nl.nn.adapterframework.batch;

import java.util.HashMap;

import nl.nn.adapterframework.configuration.ConfigurationException;
import nl.nn.adapterframework.core.INamedObject;
import nl.nn.adapterframework.core.PipeLineSession;

/**
 * Interface for handling a transformed record.
 * 
 * A RecordHandlerManager decides, based on some implementation dependent algorithm, which record handler
 * is to be used to process a record. 
 * A record manager keeps a table of flow-elements, that each define a recordhandler, resulthandler and, 
 * optionally, a next-manager.
 * 
 * @author <NAME>
 */
public interface IRecordHandlerManager extends INamedObject {

	public void configure(HashMap registeredManagers, HashMap registeredRecordHandlers, HashMap registeredResultHandlers, IResultHandler defaultHandler) throws ConfigurationException;

	/**
	 * @param flow New flow to be added to the managed flow elements
	 */
	void addHandler(RecordHandlingFlow flow);
	
	/**
	 * @param record 
	 * @return the RecordHandlingFlow element to be used to handle the record
	 * @throws Exception
	 */
	RecordHandlingFlow getRecordHandler(PipeLineSession session, String record) throws Exception;
	
	/**
	 * @param filename
	 * @return the IRecordHandlingManager to be used initially based on the name of the input file 
	 */
	IRecordHandlerManager getRecordFactoryUsingFilename(PipeLineSession session, String filename);
	
	/**
	 * @param initialFactory inidicates if this manager is the initial manager
	 */
{'fraction_non_alphanumeric': 0.08967596081386586, 'fraction_numerical': 0.03918613413715147, 'mean_word_length': 4.288180610889774, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3315745', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1127, 'n_words': 392}