But i like the gateway
... I think it gives me what I need, i.e. a way for developers to define their services without even think about the messaging platform. Basically, I want then to write code like (using Jersey annotations now)
Code:
@Path("/ExampleService")
public interface ITestService {
@Path("/ExampleService/{name}/{delay}")
String sayHello(@PathParam("name")String name, @PathParam("delay")int delay);
@Path("/ExampleService/{name}")
String sayHello(@PathParam("name")String name);
}
and
Code:
public class TestService implements ITestService{
public String sayHello(final String name, int delay) {
try {
Thread.sleep(delay *1000);
} catch (InterruptedException e) {
return String.format("Too much time, sorry");
}
return String.format("Hello %s (after %s seconds)!", name, delay);
}
public String sayHello(final String name) {
return String.format("Hello %s!", name);
}
}
and then just simply assign those to the gateway and service-activator respectively.
I have this working now, I just want to refine the all thing. Hence my suggestions. Now I see that Q2/S1 can be implemented with a MessageSelector, S2 and S5 I already implemented, but Q3/S2 and S5 will be important for my goal.
Cheers.