Enum Class McpServerProtocolEnum
- All Implemented Interfaces:
Serializable
,Comparable<McpServerProtocolEnum>
,Constable
MCP Server protocol enumeration
Represents the communication protocol used by MCP servers
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
McpServerProtocolEnum
(String displayName, String description, int defaultPort) -
Method Summary
Modifier and TypeMethodDescriptionstatic McpServerProtocolEnum
fromString
(String protocol) Get enum from string value (case insensitive)int
Get URL scheme for the protocolboolean
Check if protocol supports real-time communicationboolean
isSecure()
Check if protocol is secureboolean
Check if protocol is web-basedboolean
Check if protocol requires network connectionstatic McpServerProtocolEnum
Returns the enum constant of this class with the specified name.static McpServerProtocolEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTTP
HTTP protocol -
HTTPS
HTTPS protocol (secure HTTP) -
WEBSOCKET
WebSocket protocol -
WSS
Secure WebSocket protocol -
SSE
Server-Sent Events (SSE) -
GRPC
gRPC protocol -
TCP
TCP protocol -
STDIO
STDIO protocol (for local processes)
-
-
Field Details
-
displayName
-
description
-
defaultPort
private final int defaultPort
-
-
Constructor Details
-
McpServerProtocolEnum
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
-
getDescription
-
getDefaultPort
public int getDefaultPort() -
fromString
Get enum from string value (case insensitive) -
isSecure
public boolean isSecure()Check if protocol is secure -
isRealTime
public boolean isRealTime()Check if protocol supports real-time communication -
isWebBased
public boolean isWebBased()Check if protocol is web-based -
requiresNetwork
public boolean requiresNetwork()Check if protocol requires network connection -
getScheme
Get URL scheme for the protocol
-