How to program a {@link Int.ecb.gesmescb.event.GESMESCBWriter}


The operations to implement

Please have a look at the interfaces {@link Int.ecb.gesmescb.event.GESMESCBWriter}, {@link Int.ecb.gesmescb.event.StructureListener}, {@link Int.ecb.gesmescb.event.DataListener}, and the class {@link Int.ecb.gesmescb.event.GESMESCBEventListenerAdapter}. The roles of these are described in the documentation for the package {@link Int.ecb.gesmescb.event}.

So there are mainly three things to implement:

Similar to what is mentioned in How to write a GESMESCBReader, you may want to also implement the interface {@link Int.ecb.gesmescb.util.Named}. You find one way of how to do it in YourWriter.java.

{@link Int.ecb.gesmescb.GESMESCBObject}s

A GESMESCBWriter handles GESMESCBObjects in the same order as the {@link Int.ecb.gesmescb.event.GESMESCBReader} dispatches them. To learn about the possible sequences you may want to have a look at How to write a GESMESCBReader.

Since a {@link Int.ecb.gesmescb.MessageBegin} contains a lot of information which is needed as reference context for successive GESMESCBObjects within the message, it is in many cases a good idea to store the last MessageBegin encountered into a private field of the GESMESCBWriter, so that information can be linked to the appropriate context. The same in principle also applies to {@link Int.ecb.gesmescb.InterchangeBegin}, which, however, carries less interesting information for most applications.