1

Is there some kind of library that gives me ability to create proxy, which work like this (some kind of lazy loading).

Pseudo code:

class ServiceA {
    public ObjectA getObject() {
        // creates proxy
        // calls web service in new thread
        // returns proxy of ObjectA
    }
}

class ServiceB {
    ServiceA serviceWithProxiedObjects;

    public void doWork() {
        // some some work
        ObjectA obj = serviceWithProxiedObjects.getObject();
        // some work, but the Web Service call is still running
        System.out.println(obj.getName()); // wait until Web Service call ends
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.