Page 1 of 1

Retrieving client from session

PostPosted: Thu Aug 25, 2011 2:22 pm
by icaoberg
If I have a session, is it possible to retrieve the client object from the session. I am passing the session as an argument to a function and I need the client object. My code is

Code: Select all
#list of commands
commands = []
commands.append(omero.api.delete.DeleteCommand("/ImageAnnotationLink", link.id.val, None))
commands.append(omero.api.delete.DeleteCommand("/Annotation", annotation.id.val, None))

deleteHandlePrx = deleteService.queueDelete(commands)
callback = omero.callbacks.DeleteCallbackI(client, deleteHandlePrx)

Re: Retrieving client from session

PostPosted: Thu Aug 25, 2011 2:41 pm
by jmoore
Ivan,

it's not possible to retrieve a client from the session. The session is a remote object (ending in *Prx) and so there's no way to get a local object (the omero.client) from it. Can you pass the client instance to your function?

~Josh.

Re: Retrieving client from session

PostPosted: Thu Aug 25, 2011 2:56 pm
by icaoberg
yes dont worry. i will need to change some function calls. that is all. we will need to update some other calls but it is ok.

ivan