registerWith

public void registerWith(BoundedContext context)

Initializes the repository during its registration with its context.

Verifies that the class of aggregates of this repository subscribes to at least one type of messages.

Registers itself with CommandBus, EventBus, and ImportBus of the context for dispatching messages to its aggregates.

Parameters

context

the context of this repository

Throws

if the aggregate class does not handle any messages