Board index » jbuilder » Observer/Observable Design Pattern

Observer/Observable Design Pattern


2005-01-08 03:13:21 AM
jbuilder9
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
 
 

Re:Observer/Observable Design Pattern

Erica Wheatcroft wrote:
Quote
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.
--
Regards,
Lori Olson [TeamB]
 

Re:Observer/Observable Design Pattern

"Lori M Olson [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
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?
 

{smallsort}

Re:Observer/Observable Design Pattern

Hmm. A Proxy? Can you point me to some more info?
Thanks.. and never to late..
Erica
"Jeroen Wenting" < XXXX@XXXXX.COM >wrote in message
Quote

"Lori M Olson [TeamB]" < XXXX@XXXXX.COM >wrote in message
news:41def046$ XXXX@XXXXX.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?



 

Re:Observer/Observable Design Pattern

Erica Wheatcroft wrote:
Quote
Hmm. A Proxy? Can you point me to some more info?

Thanks.. and never to late..

Erica
"Jeroen Wenting" < XXXX@XXXXX.COM >wrote in message
news:420eef01$ XXXX@XXXXX.COM ...

>
>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?
>
>
>
Google search: proxy +pattern +jni
www.cs.technion.ac.il/~gabr/papers/cuj_jni.pdf
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html