🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #44

Re: Observer/Observable Design Pattern

#44
From: Jeroen Wenting
Date: Sun, 13 Feb 2005 06:11
30 lines
1941 bytes
"Lori M Olson [TeamB]" <javadragon@techie.com> wrote in message
news:41def046$1@newsgroups.borland.com...
> Erica Wheatcroft wrote:
> > Hi -
> >
> > I have a design problem and am looking for input.
> >
> > I have a a java app that uses JNI to communicate with a c++ dll. However
i
> > would like to implement a observer/observable design between the two and
i'm
> > not sure how i would fire "an event" from c++ to java.
> >
> > Can anyone point me to some further reading that would help me?
> >
> > Thanks in advance..
> > Erica
> >
> >
>
> Well, I have 2 JNI books, and neither of them covers this topic
> specifically.  The closest either comes is the "Essential JNI" book,
> with it's coverage of exception throwing and thread handling.  Reading
> those 2 chapters carefully, you might be able to come up with some ideas.
>

Maybe a bit late :) but doesn't this call for a proxy pattern?
Create a full Java proxy for the JNI operation which is itself the
observable and fires the event when the JNI operation has completed?
Technical Details
Message-ID: <420eef01$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41dedf57@newsgroups.borland.com> <41def046$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,3c4a4c5df3d88720
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jeroen Wenting" <jwenting@hornet.demon.nl>
Newsgroups: borland.public.jbuilder.java.api
References: <41dedf57@newsgroups.borland.com> <41def046$1@newsgroups.borland.com>
Subject: Re: Observer/Observable Design Pattern
Date: Sun, 13 Feb 2005 07:11:03 +0100
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
NNTP-Posting-Host: 212.238.240.222
Message-ID: <420eef01$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108274945 212.238.240.222 (12 Feb 2005 22:09:05 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail