RE: Problems with callbacks
"Manuel Fünfrocken" <[email protected]> Tue, 23 Aug 2005 10:59:31 +0200
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Message-ID | <[email protected]> |
Yes, TCClient is the interface. But doesn`t the VM tries to cast the object to TCClient (and throws then an Excepiton, becaus e TCClient isn`t explicit declared in the "implements" statements of any of the implementet interfaces/extended classes)?Or does the VM only checks if all functions of the interface TCClient are declared in the object? (I would say no.) I will try your suggestion! Kind regards Manuel Fünfrocken --- University of Applied Science Saarland/Germany >---------- Original Message ---------------------------------- >From: González Muñoz, Gerardo <[email protected]> >Date: Tue, 23 Aug 2005 10:07:03 +0200 > >> >>I think it is necessary to inherit from the POA object to make a server. >> >>I suppose TCClient is an interface which reference is sent to the server >>if so, you can do something like this >> >>class TCClientSrv extends TCClientPOA { >> >> TCClient client; >> >> >> SubClient ( TCClient client ){ >> this.client = client; >> } >> >> clientMethod_A( ){ >> this.client.clientMethod_A(); >> } >>} >> >>TCClientSrv cliSrv = new TCClientSrv( ... ); >> >>then you can sent to the server the reference to this object because it implemets the interface TCClient >> >>It is not marvellous but I think it works. >> >>Regards >> >> >> >>Gerardo González Muñoz >>Transportes y Tráfico >> >> >> >>C/ Mar Egeo, 4 Pol. Ind. 1 >>28850 - San Fernando de Henares - Madrid (ESPAÑA) >>Tel.: +34 91 626 87 25 >>[email protected] <mailto:[email protected]> >>www.indra.es <http://www.indra.es/> >> >> >>-----Mensaje original----- >>De: Manuel Fünfrocken [mailto:[email protected]] >>Enviado el: martes, 23 de agosto de 2005 9:48 >>Para: [email protected]; González >>Muñoz, Gerardo >>CC: [email protected] >>Asunto: RE: [OB-Users] Problems with callbacks >> >> >> >>Thanks for the fast response. >> >>Do you know if there is a possibility to implement an server "without inheritance"? >>Because the server (he is already given, and I can`t change anything on it) waits for an reference to an special object ( TCClient), so I musst inherit form it. (to be abel to cast.) >>But that means, that I can`t inherit from other objects like ClientPOA or something else (Because I`m using Java and there it is impossible to inherit from more than one class). >> >>Seems all to be very difficult.. >> >>Kind Regards >>Manuel Fünfrocken >> >>--- >>University of Applied Science >>Saarland/Germany >> >> >>---------- Original Message ---------------------------------- >>From: González Muñoz, Gerardo <[email protected]> >>Date: Tue, 23 Aug 2005 09:22:31 +0200 >> >>> >>>I think you need to implement the client as a server, so you can call to that methods from the original server >>> >>>Regards >>> >>>Gerardo González Muñoz >>>Transportes y Tráfico >>> >>> >>> >>>C/ Mar Egeo, 4 Pol. Ind. 1 >>>28850 - San Fernando de Henares - Madrid (ESPAÑA) >>>Tel.: +34 91 626 87 25 >>>[email protected] <mailto:[email protected]> >>>www.indra.es <http://www.indra.es/> >>> >>> >>>-----Mensaje original----- >>>De: [email protected] [mailto:[email protected]]En >>>nombre de Manuel Fünfrocken >>>Enviado el: martes, 23 de agosto de 2005 8:52 >>>Para: [email protected] >>>Asunto: [OB-Users] Problems with callbacks >>> >>> >>> >>>Hi! >>> >>>I`ve some questions about callbacks: >>>Is it necessary to implement the client as an server? (with starting a POA, binding to a nameserver etc.) Or does ORBacus handle this? >>>What I mean is: I can connect to an server, and now I want that he can talk to the client using callbacks. Therefor there is already an method to register the client. These method gets an reference to an objecte of the client type (respectively of the interface type from Client). But I can't simple give the client reference with "this". By doing so, I get an "org.omg.CORBA.BAD_OPERATION: The delegate has not been set" Exception. >>> >>>I don`t know how to go on... >>>Has anybody an idea? Or simple a link to a site with more infos to callbacks? >>> >>>Kind regards >>> >>>Manuel Fünfrocken >>> >>> >>>--- >>>University of Applied Science >>>Saarland/Germany >>> >>> >>>_______________________________________________ >>>OB-Users Mailing List - [email protected] >>>http://mail.ooc.nf.ca/mailman/listinfo/ob-users >>>Visit our support FAQ before you send a message. >>>http://www.orbacus.com/faq/support.html >>> >> >> >> >> > > > > _______________________________________________ OB-Users Mailing List - [email protected] http://mail.ooc.nf.ca/mailman/listinfo/ob-users Visit our support FAQ before you send a message. http://www.orbacus.com/faq/support.html