Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] need some help

Hi Greg,

adding to that, you don't need to fully implement the service interface to provide a local service (the local service instance just needs the getName() method).
All commands are handled by the CommandServer.command() method which does not need to return anything, but instead send the result to the remote via channel.sendResult().
You might also want to look at the corresponding Java implementation. The Python code follows quite closely its Java counterpart.

BTW, I see that there is a bug in the command server implementation of the locator service. It invokes the "command" method, but there is only "__command". I'll fix that.

Regards,
Toni

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Eugene Tarassov
Sent: Tuesday, May 10, 2016 11:10 PM
To: TCF Development
Subject: Re: [tcf-dev] need some help

Hi Greg,

Have a look at command handler implementation in tcf/services/local/LocatorService.py

HTH.

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Watson
Sent: Tuesday, May 10, 2016 1:22 PM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] need some help

Hi,

I would like to see if it is possible to implement a basic agent in python. I’ve been looking at the python code, which implements a client, and it looks like most of the pieces are there other than the services themselves. I’m guessing that to implement a FileSystemService (for example), I would need to subclass filesystem.FileSystemServce and provide implementations for the abstract methods. My server registers a FileSystemServiceProvider(services.ServiceProcider) class using protocol.addServiceProvider, and when I invoke a method such as ‘roots’, my CommandServer.command method is being called.

What I’m not sure about is how to implement the abstract methods. e.g. what should the methods return? It looks like the proxy methods return a FileSystemCommand, but I’m not sure what my local methods should be returning.

If anyone can provide some assistance on how to do this, it would be appreciated.

Greg
_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev

Back to the top