Currently, the PaginationBuilder is sent directly to the CommandSource, like this:
paginationService.builder().title(Text.of("MyTitle")).contents(myContents).sendTo(target);
I think we should able to call build() like every builders to get an immutable PaginationList and then send it, like this:
PaginationList myList = paginationService.builder().title(Text.of("MyTitle")).contents(myContents).build();
myList.sendTo(target);
(I want to store in cache an immutable object)
Also, It should be nice if we could call sendTo(myMessageChannel)
Make MessageChannel generic if needed (MessageChannel<? extends MessageReceiver>
to use MessageChannel<CommandSource>
)
I let developers examine my proposal