Kurvers, Eelco a écrit :
Hi all.
Currently I'm writing my first "real" application using the OSGi
framework as a basis. Now I've got a problem with/ question about the
connection between a service and its client. I haven't dealt with this
problem in the OSGi environment before.
I've got a "control" unit, controlling a GUI and managing the entire
application. I also have got a service delivering the needed
connectivity to the network (used for sending simple TCP/IP messages).
Now the control registers the "messaging service". It can send a
message, which works perfect. However the Messaging Service can also
receive messages. The problem is the service doesn't now the control,
does it? How do I trigger the control to act upon an incoming message?
Should I throw an event or something or is there an easier way?
OSGi R4 introduces a new service enabling asynchonous event
publish-subcribe between bundles.
http://bundles.osgi.org/javadoc/r4/org/osgi/service/event/package-summary.html
This slide sumarizes this service
p://www-adele.imag.fr/~donsez/cours/osgi.pdf#page=92
Karl Pauls did an implementation of it (the Felix one in fact).
I did some bridge of the EventAdmin with Ivy and Flash applications
http://www-adele.imag.fr/~donsez/dev/osgi/eaivybridge/readme.html
http://www-adele.imag.fr/~donsez/dev/osgi/eaflashbridge/readme.html
I hope this help you !
Best regards
Didier
The
control unit is not a service itself, so it can not be registered by the
service.
Anybody's got a suggestion to solving this problem? Thanks in advance.
Regards,
Eelco Kurvers
Trainee
_________________________________________
LogicaCMG - Releasing your potential
Kralingseweg 241-249
3062 CE Rotterdam
Netherlands
T: +31 (0) 10 253 7339
E: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
www.logicacmg.com
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.
--
---------------------------------------------------------
Didier DONSEZ
Laboratoire LSR, Institut Imag, Universite Joseph Fourier
Bat. C, 220 rue de la Chimie, Domaine Universitaire
BP 53, 38041 Grenoble Cedex 9, France
GPS : lat 45°11'38.3"N, lon 05°46'14.7"E, alt 223m
Tel : +33 4 76 63 55 49 Fax : +33 4 76 63 55 50
mailto:[EMAIL PROTECTED]
URL: http://www-adele.imag.fr/~donsez
---------------------------------------------------------