Hi all,
I've been looking at the Avalon project, and have wondered whether some code that I have developed would be a worthwhile addition to it.
This code is a Messaging Socket library. It is for java sockets that are used to transfer any kind of messages (so rather than a stream of data it is a stream of messages). The library supports sockets that use two threads (one reader and one writer) and NBIO (nonblocking IO - which gives the performance needed for a server). They do this so that the author can plug and play without changing their code.
The encoding and decoding of messages from the byte stream is handled by pluggable MessageSocketCodecs. This is where the developers comes in, to develop the form their messages will take. These can be as simple as a byte array. I've implemented several in this form, including a message codec that encodes XML DOMs as plain text for sending and receiving on the socket - this is particularly useful when connecting with Macromedia Flash XML Socket stuff. These can be found in nz.net.orac.messagesocket.codecs. (The DOM one is untested, the Xmlbeans one - see below - is tested).
Anyway, let me know if this is interesting to you. The website containing a jar with compiled and source is below, also javadoc. The code is currently unreleased and without a license.
Also, take a look at the xmlbeans package; it is a package for converting XML to JavaBeans and back without using DOM. Instead you write an XML document that specifies how the XML maps to the JavaBeans, it's pretty young but I've found it very useful. This is obviously not something that is specific to Avalon; I wonder if someone could indicate whether this is interesting and if so how people would find out about it and use it!
Kind regards,
k@rl