The problem (as I understand it) is that a caller has requested a service from an object that will be performed in another thread. The caller is subsequently aschronously notified that the operation is complete. What you desire is a means to obtain details on the operation's success or failure.

One solution:
Create a data member of WorkFrame that is an Exception (or some other status class) initialized to null. Provide an accessor to that member in WorkFrame. If the WorkFrame operation fails, set the member to accordingly.

When the caller is notified that the operation is complete, it calls the accessor method for that member. If it is null, it was successful; otherwise report the error to the user.

Tom


-----Original Message-----
From: Roger Lacroix [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 29, 2003 12:01 PM
To: jdjlist
Subject: [jdjlist] Re: JFrame reply Help


Guys,  Gals or anyone,

Does anybody have any thoughts on getting a error code out of a
JFrame?  Please...

Thanks
Roger...

At 07:47 PM 5/28/2003, you wrote:
>All:
>
>I am writing a "headless" (i.e. non GUI) Java server application to do a
>document merge then printing of the merged document. (JDK v1.4 and Windows
>2000
>Server).
>
>Basically it goes as follows:
>- Get a message off the queue (tab delimited data)
>- Merge the incoming with a "template" HTML file
>- open a JFrame and wait for JFrame to end
>    - In the JFrame, render the HTML using JEditorPane, print the merged HTML
>file and then dispose of JFrame
>- send reply message
>
>I have all the validation and error checking done outside of the JFrame class
>including verifying the printer.  So almost nothing should go wrong with
>printing of the document but sometimes a weird exception may happen.
>
>I would like to post a error code via a method or something just in case
>there
>is a problem in the JFrame.  But I cannot seems to figure it out.
>
>       JFrame frame = new WorkFrame();
>       // create synchronized lock
>       frame.show();
>       // wait on lock
>       // some how check status of JFrame
>
>Anybody, know how to get a error code / status out of a JFrame?  Or any other
>way?
>
>Thanks
>Roger...
>
>
>---
>You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to [EMAIL PROTECTED]
>http://www.sys-con.com/fusetalk



---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

THIS TRANSMISSION, INCLUDING ANY ATTACHMENTS OR FILES,

CONTAINS AIRNET COMMUNICATIONS CORPORATION CONFIDENTIAL

AND PROPRIETARY INFORMATION WHICH MAY BE OTHERWISE EXEMPT

FROM DISCLOSURE.

The information is intended to be for the exclusive use of the individual

or entity named above. If you are not the intended recipient,

be advised that any disclosure, copying, distribution or other use

of this information is strictly prohibited. If you have received this

transmission in error, please notify us by telephone at 1-321-984-1990 or

by email to [EMAIL PROTECTED] immediately and do not read, print

or save this information in any manner.

Reply via email to