Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-24-2007
ashfaqframewala ashfaqframewala is offline
Registered User
 
Name: Ashfaq Framewala
Organization: Merrill Lynch
Project: TASS
 
Join Date: Jun 2007
Posts: 3
Pass Object as payload

What's the best practice to pass a Java object as a payload? One way which I can think of is define an interface in the module and provide getters and setters to access the members. However, in this case every call to a getter or setter will result in a remote call.

Is there a better way to achieve this?

Thanks,
Ashfaq
Reply With Quote
  #2 (permalink)  
Old 07-24-2007
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I'm not really sure what you exactly want to do here. Did you look at slice classes? This seems to be more what you are looking for. For example:

Code:
// Slice
class Foo
{
   void dosomething();
   int a;
   string b;
};

interface Bar
{
    void doit(Foo f);
};
Calling Bar::doit will pass the class Foo by value, not by proxy, over the wire. I suggest looking in the Ice manual for more details.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object* add(Object servant, Identity id),can the servant be static object? russule Help Center 2 06-23-2007 08:19 AM
How to pass complex C++ containers in ICE? jvme Help Center 1 08-04-2005 06:30 PM
how to pass/receive value which I dont know at compilation time kovacm Help Center 2 05-10-2005 06:35 PM
bug when pass a class by value damingyipai Bug Reports 2 04-02-2004 03:51 AM
Semantics of pass by value for interface chaukmean Help Center 2 11-27-2003 06:21 AM


All times are GMT -4. The time now is 12:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.