proxy objects

asked 2015-04-10 07:30:13 -0700

marcomontebello gravatar image

The only way to call a method is to define a proxy object by a client side that implements the same interface of a service. Is it correct? Is there another way that doesn't involve the implementation of the service's interface in the client and allows a direct method call on the service?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-13 09:05:48 -0700

stevek gravatar image

In the standard client library, you must use a ProxyBusObject instance to send a method call to the associated BusObject implemented by the service you are using. The ProxyBusObject code creates a properly formed AllJoyn message and sends it to the router node which then forwards that message to the correct destination based on information in the message created by the ProxyBusObject code.

From a more philosophical point of view, the client application needs to know the service's interface regardless of whether or not it is explicitly defined in the ProxyBusObject, by the mere virtue that the client application is trying to call that method.

edit flag offensive delete publish link more


Could you help me to understand all this things better? For example, considering the About Sample client provided by the SDK (written in Java) why I need the same SampleInterface into my package that i find in Service? There is a way to obtain dynamically the same interface from the Service?

marcomontebello ( 2015-04-15 08:50:29 -0700 )edit

Could the getInterface() API help me? and if yes why in that example using this API i specify the exact name of the service's interface?

marcomontebello ( 2015-04-15 08:53:54 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-10 07:30:13 -0700

Seen: 56 times

Last updated: Apr 13 '15