[openamq-dev] Regarding amq_client_session_wait

Pieter Hintjens ph at imatix.com
Wed Dec 19 13:38:28 CET 2007


On Dec 19, 2007 12:32 PM, blog <blog at yankeeboysoftware.com> wrote:

> Isn't the source code to the OpenAMQ WireAPI library generated ?
>
> How do I go about changing the way the code is generated ?

There are a few files involved and a short explanation of how we build
AMQP and WireAPI is worthwhile.

AMQP is based on a general protocol framework, base2/asl.  ASL
includes a code generator for client APIs:

 - base2/asl/asl_client_connection.gsl - generates an iCL class for
the connection
 - base2/asl/asl_client_session.gsl - generates an iCL class for the
session and all class methods

Any gross modifications to WireAPI require changes to one or both of
these files.

Secondly, the generated iCL classes include custom actions specified
in these files:

 - base2/asl/asl_client.asl - provides context and methods for
registering the server properties
 - openamq/clients/amq_client.asl - implements basic.get-ok and
basic.deliver methods in the WireAPI

In fact amq_client.asl is the top-level ASL script, i.e. the model
that is turned into the WireAPI classes for AMQP.  To rebuild WireAPI,
you do:

 gsl amq_client.asl

In the openamq/clients directory, and then you generate the class
files and compile.

The simplest way to make a change to - e.g. - asl_client_session.gsl is to:

 - edit the file
 - do 'boom install' in that base2/asl directory
 - go to openamq/clients
 - do 'gsl amq_client.asl'
 - do 'boom build install'

Let me know if this is helpful and I'll write it up as an article on the wiki.

-Pieter


More information about the openamq-dev mailing list