- `ChatHomeService` only deals with real `ChatRoom`s.
- Hence, there is no need for `ChatRoomFactory`, to return the simplified
interface `ChatRoomInfo`.
- This is, because the implementation specific logic is implemented in the
`ChatHomeService`, not `ChatHome` itself: the actual implementation is
hidden behind that service (and behind the service `ChatRoomService` in
the domain-class `ChatRoom`).
public interface ChatRoomFactory
{
- Mono<ChatRoomInfo> createChatRoom(UUID id, String name);
+ Mono<ChatRoom> createChatRoom(UUID id, String name);
}
@Override
- public Mono<ChatRoomInfo> createChatRoom(UUID id, String name)
+ public Mono<ChatRoom> createChatRoom(UUID id, String name)
{
log.info("Creating ChatRoom with buffer-size {}", bufferSize);
int shard = shardingStrategy.selectShard(id);