com.apama.file
Event OpenFileForReading


The OpenFileForReading event is a signal to the FileAdapter to open the file specified in order to read lines and deliver back events.

A FileHandle event will be sent back if the file has been opened successfully. It will be in response to the requestId specified here, and will contain the sessionId used for the file.

Subsequent file line events generated from this file and sent to the correlator will reference this ID.

For Fixed Width files, the optional members fieldLength, isLeftAligned and pad character must be specified. These will be mapped to the payload when being sent to the adapter.
Field summary
 stringtransportName

The name of the transport being used within the file adapter. This should match the transport name used in the IAF config file so the transport can recognise events intended for it. Default configuration: "JMultiFileTransport".
 integerrequestId

Request ID for this open file event. The response, either a FileHandle Event or an error, will contain this ID.
 stringcodec

The name of the codec to use with the file. This should match one of the codecs specified in the (static) config file. Use the null codec (by default this is called JNullCodec)to read entire lines without additional interpretation taking place.
 stringfilename

Full filename, or file pattern (i.e. *.txt, *.csv etc) within directory path if intending to read all files matching a pattern in order of last time modified.
 integerlinesInHeader

Lines in header.
 stringacceptedLinePattern

Java Regex pattern to use to match lines to read. Only lines matching this pattern will be read. Leave blank i.e. "" if all lines should be read.
 dictionary<stringstring>payload

Additional payload items.
 
Field detail

acceptedLinePattern

string acceptedLinePattern
Java Regex pattern to use to match lines to read. Only lines matching this pattern will be read. Leave blank i.e. "" if all lines should be read.

codec

string codec
The name of the codec to use with the file. This should match one of the codecs specified in the (static) config file. Use the null codec (by default this is called JNullCodec)to read entire lines without additional interpretation taking place.

filename

string filename
Full filename, or file pattern (i.e. *.txt, *.csv etc) within directory path if intending to read all files matching a pattern in order of last time modified.

linesInHeader

integer linesInHeader
Lines in header.

Text files sometimes contain a number of lines at the beginning of the file explaining the format. As these are usually of some specific format, the Apama File Adapter cannot interpret them. Therefore by skipping the lines the File adapter can return just the data contained within the file. Specify here the number of lines in the header, or 0 if no header.

payload

dictionary<stringstringpayload
Additional payload items.

requestId

integer requestId
Request ID for this open file event. The response, either a FileHandle Event or an error, will contain this ID.

transportName

string transportName
The name of the transport being used within the file adapter. This should match the transport name used in the IAF config file so the transport can recognise events intended for it. Default configuration: "JMultiFileTransport".