Code samples

All adapters created with the IAF start with a receiver containing one or more listeners. listeners come in many flavors: f.e. File, database, Queue, mailbox, REST, SAP etc.

In this simple “hello world” example you see an adapter containing a Java listener which will result in returning a fixed string.

<module>
   <adapter name="HelloWorld" active="${HelloWorld.active}">
      <receiver name="HelloWorld" className="nl.nn.adapterframework.receivers.GenericReceiver" >
         <listener name="HelloWorld" className="nl.nn.adapterframework.receivers.JavaListener" />
      </receiver>
         <pipeline firstPipe="HelloWorld">
            <exits>
               <exit path="EXIT" state="success"/>
            </exits> 
            <FixedResultPipe name="HelloWorld" className="nl.nn.adapterframework.pipes.FixedResult" returnString="Hello World">
                <forward name="success" path="EXIT"/>
            </FixedResultPipe>
        </pipeline>
    </adapter>
<module>

other examples will be added here and in the online learning environment that is in the making.