advantageous / qbit

The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
http://advantageous.github.io/qbit/
Apache License 2.0
709 stars 140 forks source link

Class Not Found Exception: io.advantageous.reakt.promise.PromiseHandle #775

Open m4mark opened 7 years ago

m4mark commented 7 years ago

Going through the totdo-Statd tutorial the 'TodoServiceMain' class spat out the not found error, it appears to centre around this statement :

final ServiceManagementBundle serviceManagementBundle = serviceManagementBundleBuilder().setServiceName("TodoServiceImpl") .setManagedServiceBuilder(managedServiceBuilder).build();

Admittedly Java is not my first language so not certain if I failed to do something.

Also, I had to replace some code in the 'TodoServiceImpl' class in order to get it to compile, see below for an example, was this the right thing to do?

@Override
@POST(value = "/todo")
public Promise<Boolean> addTodo(final Todo todo) {
    return invokablePromise(promise -> {
        /** Send KPI addTodo called every time the addTodo method gets called. */
        mgmt.increment("addTodo.called");
        todoMap.put(todo.getId(), todo);
        //promise.accept(true); // **This line was removed**
        promise.resolve(true); // **and replaced by this one**
    });
}

Any help would be most appreciated.

Mark