Hi REST can accommodate the following types: https://apacheignite.readme.io/docs/rest-api#section-data-types
You can use a ConnectorMessageIntercetor to intercept all incoming/outgoing rest requests : https://apacheignite.readme.io/docs/rest-api#section-general-configuration (https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configu ration/ConnectorConfiguration.html#setMessageInterceptor-org.apache.ignite.c onfiguration.ConnectorMessageInterceptor-) You can serialize your pojo before sending, and on the receiver end use ConnectorMessageInterceptor#onReceive to de-serialize accordingly . The interceptor also provides a way ConnectorMessageInterceptor#onSend-to transform outgoing rest requests. Thanks, Alex -----Original Message----- From: captcha <[email protected]> Sent: Thursday, October 10, 2019 4:51 PM To: [email protected] Subject: REST API: passing custom POJOs Hi Ignite Users, For the REST API, is that possible to pass custom POJO objects? An example use case: Let's say I have a Person class: class Person { String name; UUID id; Location location; } Class Location { long lat; long long; } Let's say I cache some Person objects in the Ignite cluster, keyed on their UUIDs. Now I want to pass in a Location object and a List of Person UUIDs and then return the distance between the given location and each person in the give list. This requires passing POJOs to and back from Ignite compute gird. Is it possible to use the REST API to do this? If not, what's the recommended way for this? Are there any examples I could check? Thanks. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
