xugingyang, I am installing SI as part of an implementation upgrade. I am decoupling my implementation components but I don't have the ability to modify the public API. I have no desire to expose a Message<?> to the outside world; within the network of implementation components, that would be acceptable of course.
Mark, the signature is:
Code:
void registerUser(User user)
Mark, what appeals to me though is for my registerUser() implementation to actually have the code to trigger the message/event. This will allow me to code where/when events can be sent out and allow me to mock the sending during unit testing. For example, I would prefer a simple interface like this:
Code:
public interface UserEventTriggers {
void publishRegistrationEvent(User user);
}
And my UserEventImpl would be wired up with the correct MessageChannel and use MessageBuilder to create the message.
What are your thoughts?