Hi Bryan,
Bryan LaPlante wrote:
I appreciate immensely all of your help and insight.
Sure, no problem.
The castor api is a model for anyone that wants to measure there own success.
:-) Well I'm glad you like it, but there are definately areas that need some refactoring.
I think I can control the element order by starting at my root class and
calling the unmarshal method on each child node.
I don't think you'll want to do that. The unmarshal methods are static and they re-create an Unmarshaller instance upon each call. That will definately slow things down. So you'll probably only want to create the Unmarshaller once, grab the underlying UnmarshalHandler and just pass the events off in the order you want them. You might want to look at pull-parsing (stax), you can ask for the elements in the order you want them and then forward them on to the UnmarshalHandler.
I only have two concrete
classes in the api, Application and Component but I have two interface classes Behavior and Control. The Control implementation is where a developer would create events and behavior method would respond to those events. If I can figure out a way to get the event collection populated before any other methods get called on a control I can ensure that the events will fire when they are expected to.
Have you looked into http://www.w3.org/TR/2003/REC-xml-events-20031014/ ? I am not exactly trying to support this model but I am moving toward being able to describe events that get executed on a remote machine if the event criteria is present.
I haven't taken a look at that Rec, I'll try and go over it when I get some time.
--Keith
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
