【发布时间】:2016-05-11 03:31:16
【问题描述】:
ClientWebSocketContainer Spring 类可以提供到远程端点的 websocket 连接会话。虽然如果尝试使用 ClientWebSocketContainer 的 stop()、start() 和 getSession() 方法重新建立已关闭的连接(尝试失败后),连接已建立,但 ClientWebSocketContainer 认为它没有由于失败尝试中设置的 openConnectionException 而连接。
@Override
public void onFailure(Throwable t) {
logger.error("Failed to connect", t);
ClientWebSocketContainer.this.openConnectionException = t;
ClientWebSocketContainer.this.connectionLatch.countDown();
}
我应该能够以这种方式使用 ClientWebSocketContainer 还是应该创建自己的客户端连接管理器?
【问题讨论】:
标签: spring-integration spring-websocket