samedi 5 août 2017

Map response of nodes of the graph to properties of a class

I have a Node class which looks like this:

    public class Node{
        List<Node> parents;
        List<Node> children;
        Response response;
    }

As we can see that each node has some kind of response. Each node is executed asynchronously. I have a callback method which is executed when the whole graph is completed.

Suppose we have a model class which has n properties of type Response.

    public class Model{
        Response node1;
        Response node2;
        .
        .
        .
   }

[Question]: How can I map the output of the graph to the properties of the model in a configuration driven way(Reflection, Functional interface, etc)?

Aucun commentaire:

Enregistrer un commentaire