Class McpSubscriptionConfig
java.lang.Object
com.soklet.McpSubscriptionConfig
Immutable endpoint-scoped MCP subscription configuration.
The configured notification types are the subscription-change families the endpoint may support. The publisher is application-owned and may provide either process-local or distributed broadcast delivery. This value does not transfer publisher lifecycle ownership to Soklet.
Instances intentionally retain reference identity because the publisher is a live application-owned capability, not immutable value data. Code that compares configurations should compare notification types and publisher identity according to its own lifecycle model.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for immutableMcpSubscriptionConfigvalues. -
Method Summary
Modifier and TypeMethodDescriptionReturns the application-owned broadcast publisher.Returns the endpoint's supported subscription-notification families.withEventPublisherAndNotificationTypes(@NonNull McpSubscriptionEventPublisher subscriptionEventPublisher, @NonNull Set<@NonNull McpSubscriptionNotificationType> subscriptionNotificationTypes) Vends a builder primed with its required construction values.
-
Method Details
-
withEventPublisherAndNotificationTypes
public static @NonNull McpSubscriptionConfig.Builder withEventPublisherAndNotificationTypes(@NonNull McpSubscriptionEventPublisher subscriptionEventPublisher, @NonNull Set<@NonNull McpSubscriptionNotificationType> subscriptionNotificationTypes) Vends a builder primed with its required construction values.- Parameters:
subscriptionEventPublisher- application-owned broadcast publishersubscriptionNotificationTypes- nonempty supported notification families- Returns:
- a subscription-configuration builder
- Throws:
NullPointerException- if an argument or notification type is nullIllegalArgumentException- ifsubscriptionNotificationTypesis empty
-
getEventPublisher
Returns the application-owned broadcast publisher.- Returns:
- event publisher
-
getNotificationTypes
Returns the endpoint's supported subscription-notification families.- Returns:
- immutable nonempty notification-type set in enum declaration order
-