com.neeve.aep
Interface IAepApplicationStateFactory


public interface IAepApplicationStateFactory

Factory used to create application state objects.


Method Summary
 IRogNode createState(MessageView message)
          Create a new instance of application state.
 

Method Detail

createState

IRogNode createState(MessageView message)
                     throws Exception
Create a new instance of application state.

Parameters:
message - The message at the head of the flow that triggered the creation of the the state object.
Returns:
The application state.
Throws:
Exception
Threading:
This method can be concurrently executed by multiple threads.

This method is invoked by the AEP engine on receipt of the first message per inbound message flow to create an instance of application state. The created application state instance is tag to the message's flow and is is added to the ODS store managed by the AEP engine on behalf of the application along with flow specific system state. The application state instance remains tagged to its flow for the lifetime of the flow. Each flow event (including but not restricted to messages) is tagged with the flow's application state before being dispatched to the application for processing. The application should either register message handlers with the application state root class (class of the instance returned by this method) as the second parameter or extract the state tagged to the dispatcher message/event when processing the message/event.

The engine does not impose any specific data model for application state. As far as the engine is concerned, an application's state is structured simply as an object graph i.e. an ROG container node and no assumptions are made about the container data model. The structure of the container is defined by the application and returned here as a generic ROG container node object.



Copyright © 2016 Neeve Research, LLC. All Rights Reserved.