Class McpSubscriptionConfig.Builder
java.lang.Object
com.soklet.McpSubscriptionConfig.Builder
- Enclosing class:
McpSubscriptionConfig
Builder for immutable
McpSubscriptionConfig values.
This class is intended for use by a single thread.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an immutable endpoint subscription configuration.notificationTypes(@NonNull Set<@NonNull McpSubscriptionNotificationType> subscriptionNotificationTypes) Replaces the supported subscription-notification families.
-
Method Details
-
notificationTypes
public @NonNull McpSubscriptionConfig.Builder notificationTypes(@NonNull Set<@NonNull McpSubscriptionNotificationType> subscriptionNotificationTypes) Replaces the supported subscription-notification families. A failed replacement leaves the previous families unchanged.- Parameters:
subscriptionNotificationTypes- nonempty notification families- Returns:
- this builder
- Throws:
NullPointerException- if the set or any item is nullIllegalArgumentException- if the set is empty
-
build
Builds an immutable endpoint subscription configuration.- Returns:
- subscription configuration
- Throws:
IllegalStateException- if no notification type was configured
-