The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Object Communication In An Object-Oriented System

Posted by Bradley Smith on April 14, 2000 at 10:25 AM

I am in the process of designing an Object-Oriented (I Hope) framework to isolate our business objects from the UI portion of the program. The UI is assembled from XML files, so there is no compile-time representation of any of the objects, except for the (framework) implementation classes. My problem is this: I need a way to allow objects to communicate (I.E., The login screen needs to pass a message to a subordinate screen about the intended function, etc.), and in many cases the target of the message may not be loaded (but needs to get the message once loaded). My solution was to create named messagequeues. The Login object could create a queue with a specific name, and as long as the target object knows about the queue name, it could retrieve messages targetted to it. The queues would be controlled by the runtime, so there would be no limits to the communication.

That's my initial attempt. Does anyone have a better or more complete idea? Also, does anyone have any experience trying to automate testing of systems such as this?

Any help would be much appreciated.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us