public static class SubscriptionService.Builder
extends java.lang.Object
SubscriptionService
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SubscriptionService.Builder |
add(BoundedContext context)
Adds the context to be handled by the subscription service.
|
SubscriptionService |
build()
Builds the
SubscriptionService . |
com.google.common.collect.ImmutableList<BoundedContext> |
contexts()
Obtains the context added to the subscription service by the time of the call.
|
SubscriptionService.Builder |
remove(BoundedContext context)
Removes the context from being handled by the subscription service.
|
@CanIgnoreReturnValue public SubscriptionService.Builder add(BoundedContext context)
@CanIgnoreReturnValue public SubscriptionService.Builder remove(BoundedContext context)
public com.google.common.collect.ImmutableList<BoundedContext> contexts()
public SubscriptionService build() throws java.lang.IllegalStateException
SubscriptionService
.java.lang.IllegalStateException
- if no Bounded Contexts were added.