Record Class McpServerSSE
java.lang.Object
java.lang.Record
com.github.thought2code.mcp.annotated.configuration.McpServerSSE
public record McpServerSSE(String messageEndpoint, String endpoint, String baseUrl, Integer port)
extends Record
This record represents the Server-Sent Events (SSE) configuration for an MCP (Model Context
Protocol) server.
It contains properties such as the message endpoint, endpoint, base URL, and port.
- Author:
- codeboyzhou
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class forMcpServerSSE. -
Constructor Summary
ConstructorsConstructorDescriptionMcpServerSSE(String messageEndpoint, String endpoint, String baseUrl, Integer port) Creates an instance of aMcpServerSSErecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.static McpServerSSE.Builderbuilder()Creates a new instance ofBuilderto buildMcpServerSSE.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.static McpServerSSEReturns the default SSE configuration of the MCP server.final inthashCode()Returns a hash code value for this object.Returns the value of themessageEndpointrecord component.port()Returns the value of theportrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpServerSSE
Creates an instance of aMcpServerSSErecord class.- Parameters:
messageEndpoint- the value for themessageEndpointrecord componentendpoint- the value for theendpointrecord componentbaseUrl- the value for thebaseUrlrecord componentport- the value for theportrecord component
-
-
Method Details
-
builder
Creates a new instance ofBuilderto buildMcpServerSSE.- Returns:
- A new instance of
Builder.
-
getDefault
Returns the default SSE configuration of the MCP server.By default, the message endpoint is "/mcp/message", the endpoint is "/sse", the base URL is
StringHelper.EMPTY, and the port is 8080.- Returns:
- The default SSE configuration of the MCP server.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
messageEndpoint
Returns the value of themessageEndpointrecord component.- Returns:
- the value of the
messageEndpointrecord component
-
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
port
Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-