Skip to content
jimfcarroll edited this page Aug 10, 2012 · 3 revisions

The Application Developer Api

lib-dempsyapi contains all of the classes, interfaces, and annotations that an "application developer" would need. Some of these we've seen already. A table with brief overview follows. These are expanded upon in more detail in later sections.

Element Description
@MessageProcessor This is a class annotation that identifies the class of a message processor prototype
@MessageHandler This is a method annotation that identifies a method on a message processor prototype class (which must be annotated with a @MessageProcess annotation) as one that handles a message. The method so annotated must take a single object class which must follow the Dempsy message requirements and can also return a message if desired.
@MessageKey As described above, a Dempsy message class requires that one, and only one, method be annotated as a message key.
@Activation, @Passivation When Dempsy instantiates a message processor to handle a particular message, it's first @Activated and provided the message key. Also, when Dempsy removes a message processor it will @Passivate it first.
@Output Dempsy can make calls on message processors based on a particular schedule rather than simply based on incoming data. Methods annotated with the @Output call will be invoked at these scheduled times, and the data they return, if a compliant Dempsy message, will be passed on
@Evictable Dempsy can remove unused message processors from the container. This behavior is fully controlled by the application developer
Adaptor The Adaptor interface is implemented by the application developer to adapt Dempsy to external sources of data.
KeySource Dempsy can pre-create all message processors at start-up rather than simply based on incoming data. The application developer will implement the KeySource interface to provide the domain of the key-space to Dempsy.

Next section: The Message Processor Lifecycle

Clone this wiki locally