On Tue, 5 Jun 2001, Karl wrote: > 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! Did you looked at castor-xml at http://castor.exolab.org ? It does exacly that and even more (mostly ANY java class can be marshalled to xml and back with and without a mapping description). I'm interested in how you did it so I'll have a look at it. Giacomo > > Kind regards, > k@rl > > > > http://www.orac.net.nz/java/ > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]