| Class | Adaptation::Adaptor |
| In: |
lib/adaptation/adaptor.rb
|
| Parent: | Object |
Adaptation::Adaptor is the base class for those classes containing the logic to be executed when a message is read through the mom.
Each class extending Adaptation::Adaptor must implement the process function, using it as the main entry point for the logic to be executed when a message arrives. The name of the class extending Adaptation::Message associates the class with the one to be executed when a message arrives. Ie. if a message is received with a root element named <hello>, adaptation will search for a class extending Adaptation::Adaptor named HelloAdaptor.
Adaptation::Adaptors (classes extending Adaptation::Adaptor) must be stored under app/adaptors_name in the adaptation file tree. This is done automatically when an adaptor is generated using adaptation built-in generator:
script/generate adaptor hello