[2140] in java-interest
Re: Fn ptrs & ... callbacks!?
daemon@ATHENA.MIT.EDU (Gary Aitken)
Tue Sep 26 01:19:04 1995
Date: Mon, 25 Sep 1995 21:03:34 -0700
From: garya@village.org (Gary Aitken)
To: Sal Cataudella <salc@ovid.com>
Cc: Andrew Wason <aw@bae.bellcore.com>, java-interest@java.sun.com
In-Reply-To: <Pine.A32.3.91.950925112539.4822B-100000@psyche.ovid.com>
>Actually, with the Callbackable vector scheme you will be subclassing
>for *every* method which you want to have called back, not just every
>new class which you want called back.
This can be avoided, if one uses a canonical form for methods which are
callbackable. Give them a signature which has a single argument, an
object of class "CallbackInfo" or whatever. The different callblack
types subclass CallblackInfo to get their specific input /output data
objects. In the callback you get the generic input object, validate
its type as appropriate, and downcast it to the specific type. Don't
know if Java will allow downcasting to a valid type; I'm a newbie and
still learning...
Gary Aitken garya@village.org
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com