Connecting Apama Applications to External Components > Using Standard Adapters > Using the Apama File Adapter
Using the Apama File Adapter
This chapter provides a description of the Apama File adapter that is included when you install the Apama software. Each Apama standard adapter includes the transport and codec plug-ins it requires, along with any required EPL service monitor files. The C++ plug-ins are located in the Apama installation’s adapters\bin directory (Windows) or adapters/lib directory (UNIX); the Java plug-ins are located in adapters\lib. The EPL files are located in the adapters\monitors directory.
If you develop an application in Apama Studio, when you add a standard adapter to the project, Apama Studio automatically creates a configuration file for it. In addition, the standard Apama adapters include bundle files that automatically add the adapter’s plug-ins and associated service monitor files to the Apama Studio project.
If you are not using Apama Studio, you need to create a configuration file that will be used by the IAF to run the adapter. Each adapter includes a template file that can be used as the basis for the configuration file. The template files are located in the installation’s adapters\config directory and have the forms adapter_name.xml.dist and adapter_name.static.xml. These template files are not meant to be used as the adapters’ actual configuration files — you should always make copies of the template files before making any changes to them.
The Apama File adapter uses the Apama Integration Adapter Framework (IAF) to read information from text files and write information to text files by means of Apama events. This lets you read files line-by-line from external applications or write formatted data as required by external applications.
With some caveats, which are mentioned later in this section, the File adapter supports reading and writing to multiple files at the same time. Information about using the File adapter can be found in the following topics:
*File Adapter plug-ins
*File Adapter service monitor files
*Adding the File adapter to an Apama Studio project
*Configuring the File adapter
*Overview of event protocol for communication with the File adapter
*Opening files for reading
*Specifying file names in OpenFileForReading events
*Opening comma separated values (CSV) files
*Opening fixed width files
*Sending the read request
*Requesting data from the file
*Receiving data
*Opening files for writing
*LineWritten event
*Monitoring the File adapter
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.