Skip to content

Messaging API and templating engine

JGuillemotte edited this page Feb 1, 2012 · 12 revisions
  • Messaging API :

See https://github.com/easysoa/EasySOA/tree/master/easysoa-registry/easysoa-registry-api/easysoa-registry-api-messaging

This API contains classes to define HTTP messages and exchange records.

HTTP Message is used to build a java reprensentation of an HTTP message so it contains all the informations concerning the request and the response. Exchange record objects are used to store the HTTP messages.

This API is used at the moment by the HTTP Discovery proxy.

  • Templating engine

Correlation service : This service make an analysis of the request to define the most intereesant fields. It is working with a correlation mechanism, comparing the request with the response.

TemplateBuilder : Builds a template from the field suggested by the correlation service and the exchange record. This template is mad with Velocity. Each suggested field is replaced in the request by a velocity expression (eg : $arg2.get("key"). Then, this 'custom' exchange is stored and can be used by the TemplateRenderer.

TemplateRenderer : Render a template by replacing the template expressions by the provided values. Then the result can be used by the tamplate executor.

TemplateExecutor : Execute the rendered template (send the request, using the utility class RequestForwarder) and returns the response.

  • Custom ProxyImplementationVelocity class

Some modifications are

  • Custom ServletImplementationVelocity class
Clone this wiki locally