会话错别字

This commit is contained in:
jiangzeyin 2019-04-19 10:45:46 +08:00
parent 117682af93
commit 417e1a31ae
7 changed files with 15 additions and 15 deletions

2
FQA.md
View File

@ -8,7 +8,7 @@
修改管理程序命令文件中 --jpom.log=/jpom/log/
### 如何修改话超时时长
### 如何修改话超时时长
在管理程序命令文件中 ARGS 变量添加 --tomcat.sessionTimeOut=1800

View File

@ -35,7 +35,7 @@ public class FileTailWatcher implements Runnable {
private LimitQueue limitQueue = new LimitQueue(10);
private final RandomAccessFile randomFile;
/**
* 所有
* 所有
*/
private Set<Session> socketSessions = new HashSet<>();
private final String log;
@ -49,7 +49,7 @@ public class FileTailWatcher implements Runnable {
* 添加文件监听
*
* @param log 日志文件路径
* @param session
* @param session
* @throws IOException 异常
*/
public static void addWatcher(String log, Session session) throws IOException {
@ -76,7 +76,7 @@ public class FileTailWatcher implements Runnable {
/**
* 有客户端离线
*
* @param session
* @param session
*/
public static void offline(Session session) {
Collection<FileTailWatcher> collection = CONCURRENT_HASH_MAP.values();
@ -96,9 +96,9 @@ public class FileTailWatcher implements Runnable {
}
/**
* 添加监听
* 添加监听
*
* @param session
* @param session
*/
private void add(Session session) {
if (this.socketSessions.add(session)) {

View File

@ -37,7 +37,7 @@ public class TopManager {
/**
* 添加top 命令监听
*
* @param session
* @param session
*/
public static void addMonitor(Session session) {
SESSIONS.add(session);
@ -47,7 +47,7 @@ public class TopManager {
/**
* 移除top 命令监控
*
* @param session
* @param session
*/
public static void removeMonitor(Session session) {
SESSIONS.remove(session);

View File

@ -7,7 +7,7 @@ import javax.websocket.Session;
import java.io.IOException;
/**
* socket 话对象
* socket 话对象
*
* @author jiangzeyin
* @date 2018/9/29
@ -25,7 +25,7 @@ public class SocketSessionUtil {
/**
* 发送消息
*
* @param session 话对象
* @param session 话对象
* @param msg 消息
* @throws IOException 异常
*/

View File

@ -13,7 +13,7 @@ import java.net.URISyntaxException;
import java.util.Objects;
/**
* 代理socket
* 代理socket
*
* @author jiangzeyin
* @date 2019/4/16

View File

@ -80,7 +80,7 @@ public class LoginControl extends BaseServerController {
circleCaptcha.write(response.getOutputStream());
String code = circleCaptcha.getCode();
setSessionAttribute(LOGIN_CODE, code);
// 话显示验证码
// 话显示验证码
setSessionAttribute(SHOW_CODE, true);
}

View File

@ -43,7 +43,7 @@ public class ServerWebSocketHandle {
*
* @param userInfo 用户授权信息
* @param projectId 项目id
* @param session
* @param session
*/
@OnOpen
public void onOpen(@PathParam("nodeId") String nodeId, @PathParam("userInfo") String userInfo, @PathParam("projectId") String projectId, Session session) {
@ -71,7 +71,7 @@ public class ServerWebSocketHandle {
url = StrUtil.format(url, projectId, userName);
ProxySession proxySession = new ProxySession(url, session);
PROXY_SESSION_CONCURRENT_HASH_MAP.put(session.getId(), proxySession);
SocketSessionUtil.send(session, StrUtil.format("欢迎加入:{} 话id:{} 当前会话总数:{}", userModel.getName(), session.getId(), onlineCount.incrementAndGet()));
SocketSessionUtil.send(session, StrUtil.format("欢迎加入:{} 话id:{} 当前会话总数:{}", userModel.getName(), session.getId(), onlineCount.incrementAndGet()));
USER.put(session.getId(), userModel);
} catch (Exception e) {
DefaultSystemLog.ERROR().error("socket 错误", e);
@ -92,7 +92,7 @@ public class ServerWebSocketHandle {
public void onMessage(String message, Session session) throws IOException {
UserModel userModel = USER.get(session.getId());
if (userModel == null) {
SocketSessionUtil.send(session, "话信息失效,刷新网页再试");
SocketSessionUtil.send(session, "话信息失效,刷新网页再试");
session.close();
return;
}