473,804 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RPCXML hide implementation.

x_O
Hi

I'm working recently with XMLRPC for python and It never was so easy.

But I've meet a obstacle. Because python is not giving us any
reasonable encapsulation mechanism, I have problems with hiding some
part of the implementation.

When class has 2 methods and I want to make rpc private only ONE of
them. I can always use __name. But what in case when I really need to
use those two methods inside other class as a public, but not by RPC

Simple code:
class RpcClass:
def one(self): #visible by RPC, available as public for other class
return "one"
def two(self): #INVISIBLE by RPC, available as public for other
class
return "two"

Server.register _instance(RpcCl ass())

Thanks
Aug 26 '08 #1
1 1138
xSimple code:
xclass RpcClass:
x def one(self): #visible by RPC, available as public for other class
x return "one"
x def two(self): #INVISIBLE by RPC, available as public for other
xclass
x return "two"

xServer.registe r_instance(RpcC lass())

Just register the method you want to publish, not the entire instance.

Skip
Aug 26 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1677
by: Ed | last post by:
Hi, I have a WorkUnit class. I will pass a reference to a group of these WorkUnits to other classes in my application. I have chosen to use a vector to hold pointers to these WorkUnits for now. However, I think that I should hide the fact that it's a vector in case I want to switch to another container class at a later date. I don't want every class that needs to use the group of WorkUnits to be too tightly bound to the details of the...
10
3303
by: Ray Z | last post by:
hi, there I build a Class Library, I write a class A to implement interface IA. The problem is when I give the dll file to others, thet can get all information about not only IA, but also A. They can even see my protected members of class A. How could I hide these informations about class A, just give them the interface informations. thanks.
6
3017
by: Alex Sedow | last post by:
Example 1 interface I { string ToString(); } public class C : I { public void f() {
3
5514
by: Tom Jones | last post by:
I do not understand what is meant when someone states that a given method is "hidden" verses overriden. Would someone please provide a short example of both cases and why you might want to "hide" a parent method's implementation verses simply overriding it (ie take advantage of polymorphism)? Thanks, TJ
14
4834
by: Laurent Vigne | last post by:
Hello, I would like to know how to make the methods of an interface inaccessible from outside Example: ---------------------------------------------- internal Interface ImyInterface { void MyPrivateMethod(); // I cant define any accessibility here, well ok ! }
6
1512
by: Guch Wu | last post by:
There is a baseclass A. B is its subclass. I want to hide class B. All operations to B are all by means of virtual functions in A. Class users can only see class A. B is transparent to them. How can I do this?
6
3969
by: Ralph | last post by:
Hi, I was reading effictive C++ and some other books again and they all tell you about hiding implementation details (proxy/pimpl/inheritance) but they never really explain when to use it. I am starting on a new project which is part library so I think it would be good to hide the implementation for the public classes in the library but this seems a lot of overhead to me (both when developing and runtime overhead).
2
1909
by: puzzlecracker | last post by:
I don't see the purpose of explicit interface implementation other than to hide its signature in the class that implements it, and, instead, write your own, perhaps with a different signature, implementation. Also, if you implement more than two interfaces with the same method, which is rarity in practice or so it seems. To me it appears a shallow end... Am I missing something? Thanks
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.