Archived
This forum has been archived. Please start a new discussion on GitHub.
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
Is there a better way to achieve this?
Thanks,
Ashfaq
0
Comments
-
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:
// 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.0