WebSocketTransportException
public class WebSocketTransportException extends RuntimeException
io/agentscope/core/model/transport/websocket/WebSocketTransportException.java:35–106WebSocket 传输层异常,表示执行过程中的错误。位于 io.agentscope.core.model.transport.websocket 包,继承自 RuntimeException。核心成员包括 getUrl、getConnectionState、getHeaders、getMessage、WebSocketTransportException。
WebSocket transport layer exception.
Wraps underlying transport errors with connection context to help diagnose issues. This exception preserves the complete error chain while adding transport-specific context.
Context information includes:
-
WebSocket URL
-
Connection state (OPEN/CLOSED/CONNECTING)
-
Request headers (for authentication/configuration debugging)
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public WebSocketTransportException(String message, Throwable cause, String url, String connectionState) | 创建WebSocketTransportException。 Create a WebSocketTransportException. |
public WebSocketTransportException(String message, Throwable cause, String url, String connectionState, Map<String, String> headers) | 创建WebSocketTransportException 使用请求头。 Create a WebSocketTransportException with headers. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getUrl() | 获取WebSocket URL。 Get the WebSocket URL. |
public String getConnectionState() | 获取连接状态。 Get the connection state. |
public Map<String, String> getHeaders() | 获取请求请求头。 Get the request headers. |
public String getMessage() | 获取消息。 Returns the message. |
构造器详情Constructor Detail
WebSocketTransportException
public WebSocketTransportException(String message, Throwable cause, String url, String connectionState)
创建WebSocketTransportException。
Create a WebSocketTransportException.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。Error message |
cause | Throwable | cause(类型 `Throwable`)。Root cause exception |
url | String | 服务地址(类型 `String`)。WebSocket URL |
connectionState | String | 连接状态(类型 `String`)。Connection state (OPEN/CLOSED/CONNECTING) |
io/agentscope/core/model/transport/websocket/WebSocketTransportException.java:49–52WebSocketTransportException
public WebSocketTransportException(String message, Throwable cause, String url, String connectionState, Map<String, String> headers)
创建WebSocketTransportException 使用请求头。
Create a WebSocketTransportException with headers.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。Error message |
cause | Throwable | cause(类型 `Throwable`)。Root cause exception |
url | String | 服务地址(类型 `String`)。WebSocket URL |
connectionState | String | 连接状态(类型 `String`)。Connection state |
headers | Map<String, String> | 请求头(类型 `Map`)。Request headers (for debugging) |
io/agentscope/core/model/transport/websocket/WebSocketTransportException.java:63–73方法详情Method Detail
getUrl
public String getUrl()
获取WebSocket URL。
Get the WebSocket URL.
Stringio/agentscope/core/model/transport/websocket/WebSocketTransportException.java:80–82getConnectionState
public String getConnectionState()
获取连接状态。
Get the connection state.
Stringio/agentscope/core/model/transport/websocket/WebSocketTransportException.java:89–91getHeaders
public Map<String, String> getHeaders()
获取请求请求头。
Get the request headers.
Map<String, String>io/agentscope/core/model/transport/websocket/WebSocketTransportException.java:98–100getMessage
public String getMessage()
获取消息。
Returns the message.
Stringio/agentscope/core/model/transport/websocket/WebSocketTransportException.java:102–105