UnBiquitous/uos_core — pull request #3 by nuk (2013-04-19 19:41:29+00:00)
Title: Applications Callback Service API

Now every application has a callback service API.
This API works by reflection and was kept to the most simple way possible.
If you have an Application. Just create a method that receive a *Map* and returns a *Map*. like bellow:

public Map myCallback(Map parameter){
...
return response;
}

The parameter correspond to the parameters sent on a ServiceCall and the response map will be introduced in a ServiceReponse after the execution.

To call the method you use the same callService api provided in the *Gateway*. Just use the *Logical Driver* named **app** and everything will keep working as before.

Ex:

gateway.callService(device,new ServiceCall("app","callback","appId"));