Class SokletConfig
java.lang.Object
com.soklet.SokletConfig
Defines how a Soklet system is configured.
Threadsafe instances can be acquired via one of the builder factory methods such as withHttpServer(HttpServer),
withSseServer(SseServer), or withMcpServer(McpServer).
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder used to construct instances ofSokletConfig.static final classBuilder used to copy instances ofSokletConfig. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Vends a mutable copy of this instance's configuration, suitable for building new instances.How Soklet handles Cross-Origin Resource Sharing (CORS).The HTTP server managed by Soklet, if configured.How Soklet will perform instance creation.How Soklet will observe server and request lifecycle events.The MCP server managed by Soklet, if configured.How Soklet will collect operational metrics.How Soklet will marshal request bodies to Java types.How Soklet will perform custom behavior during request handling.How Soklet performs Resource Method parameter injection (experts only!)How Soklet performs Resource Method resolution (experts only!)The SSE server managed by Soklet, if configured.static @NonNull SokletConfig.BuilderwithHttpServer(@NonNull HttpServer httpServer) Vends a configuration builder, primed with the given HTTPHttpServer.static @NonNull SokletConfig.BuilderwithMcpServer(@NonNull McpServer mcpServer) Vends a configuration builder, primed with the givenMcpServer.static @NonNull SokletConfig.BuilderwithSseServer(@NonNull SseServer sseServer) Vends a configuration builder, primed with the givenSseServer.
-
Method Details
-
withHttpServer
Vends a configuration builder, primed with the given HTTPHttpServer.- Parameters:
httpServer- the HTTP server necessary for construction- Returns:
- a builder for
SokletConfiginstances
-
withSseServer
Vends a configuration builder, primed with the givenSseServer.- Parameters:
sseServer- the SSE server necessary for construction- Returns:
- a builder for
SokletConfiginstances
-
withMcpServer
Vends a configuration builder, primed with the givenMcpServer.- Parameters:
mcpServer- the MCP server necessary for construction- Returns:
- a builder for
SokletConfiginstances
-
copy
Vends a mutable copy of this instance's configuration, suitable for building new instances.- Returns:
- a mutable copy of this instance's configuration
-
getInstanceProvider
How Soklet will perform instance creation.- Returns:
- the instance responsible for instance creation
-
getValueConverterRegistry
- Returns:
- the instance responsible for value conversions
-
getRequestBodyMarshaler
How Soklet will marshal request bodies to Java types.- Returns:
- the instance responsible for request body marshaling
-
getResourceMethodResolver
How Soklet performs Resource Method resolution (experts only!)- Returns:
- the instance responsible for Resource Method resolution
-
getResourceMethodParameterProvider
How Soklet performs Resource Method parameter injection (experts only!)- Returns:
- the instance responsible for Resource Method parameter injection
-
getResponseMarshaler
- Returns:
- the instance responsible for response body marshaling
-
getRequestInterceptor
How Soklet will perform custom behavior during request handling.- Returns:
- the instance responsible for request interceptor behavior
-
getLifecycleObserver
How Soklet will observe server and request lifecycle events.- Returns:
- the instance responsible for lifecycle observation
-
getMetricsCollector
How Soklet will collect operational metrics.- Returns:
- the instance responsible for metrics collection
-
getCorsAuthorizer
How Soklet handles Cross-Origin Resource Sharing (CORS).- Returns:
- the instance responsible for CORS-related processing
-
getHttpServer
The HTTP server managed by Soklet, if configured.- Returns:
- the HTTP server, if configured
-
getSseServer
The SSE server managed by Soklet, if configured.- Returns:
- the SSE server instance, or
Optional.empty()if none was configured
-
getMcpServer
The MCP server managed by Soklet, if configured.- Returns:
- the MCP server, if configured
-