All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.healthy.common.websocket.handler.ConcurrentWebSocketSessionOptions Maven / Gradle / Ivy

There is a newer version: 2.0.0-M1
Show newest version
package com.healthy.common.websocket.handler;

import lombok.Data;
import org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator;

/**
 * 并发使用 WebSocketSession 的相关配置
 *
 * @author xm.z
 */
@Data
public class ConcurrentWebSocketSessionOptions {

	/**
	 * 是否在多线程环境下进行发送
	 */
	private boolean enable = false;

	/**
	 * 发送时间的限制(ms)
	 */
	private int sendTimeLimit = 1000 * 5;

	/**
	 * 发送消息缓冲上限 (byte)
	 */
	private int bufferSizeLimit = 1024 * 100;

	/**
	 * 溢出时的执行策略
	 */
	ConcurrentWebSocketSessionDecorator.OverflowStrategy overflowStrategy = ConcurrentWebSocketSessionDecorator.OverflowStrategy.TERMINATE;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy