regurgitator-core

regurgitator is a lightweight, modular, extendable java framework that you configure to ‘regurgitate’ canned or clever responses to incoming requests; useful for quickly mocking or prototyping services without writing any code. simply configure, deploy and run.

start your reading here: regurgitator-all

messages

upon invocation, regurgitator models each incoming request as a message, passed to regurgitator for processing. this message holds all data accessible by the steps configured to run, and is passed to each step as it is executed. depending on its type, a step might read from, add to, or aggregate together data from within the message. when the processing required is complete (and if configured to do so) a step will return a response (or responses) to the incoming request, effectively ending the invocation - job done.

accept request (as message) => execute steps (build responses using message data) => send back response(s)

a message may be pre-populated with input data before regurgitator is invoked, such as metadata about an http call. each data item is stored in the message as a parameter, stored under a context, which groups a set of related parameters together. the default context is simply parameters. some more specific contexts (for http) include request-headers, response-payload and global-metadata. the message also provides the response callback mechanism through which responses are sent back out of regurgitator. see code example here.

a message can also be auto-populated with data that persists between requests, through the use of global data and sessions.

steps

regurgitator-core provides the following basic steps:

more steps are available in other modules (ext, web, mq)

constructs

regurgitator uses the following set of constructs / concepts to provide it’s processing:

just as custom steps can be added to extend regurgitator to meet your needs, you can also provide your own construct implementations to further extend the capabilities of the framework.

core constructs

regurgitator-core provides the following basic constructs:

parameter types

all of the above have list and set types, holding collections of the java type, e.g. LIST_OF_STRING, SET_OF_DECIMAL

value generators

value processors

rules behaviours

rules behaviours are explained alongside decision steps here: xml, json, yml

condition behaviours

condition behaviours are explained alongside decision steps here: xml, json, yml

more constructs are available in other modules (ext, web)


api docs: 0.1.5 0.1.4 0.1.3 0.1.2