类 WebSocketMessageBrokerStats
- java.lang.Object
- org.springframework.web.socket.config.WebSocketMessageBrokerStats
public class WebSocketMessageBrokerStats extends Object
A central class for aggregating information about internal state and counters from key infrastructure components of the setup that comes with@EnableWebSocketMessageBroker
for Java config and<websocket:message-broker>
for XML.By default aggregated information is logged every 30 minutes at INFO level. The frequency of logging can be changed via
setLoggingPeriod(long)
.This class is declared as a Spring bean by the above configuration with the name "webSocketMessageBrokerStats" and can be easily exported to JMX, e.g. with the
MBeanExporter
.- 从以下版本开始:
- 4.1
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 WebSocketMessageBrokerStats()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getClientInboundExecutorStatsInfo()
Get stats about the executor processing incoming messages from WebSocket clients.String
getClientOutboundExecutorStatsInfo()
Get stats about the executor processing outgoing messages to WebSocket clients.long
getLoggingPeriod()
Return the configured logging period frequency in milliseconds.String
getSockJsTaskSchedulerStatsInfo()
Get stats about the SockJS task scheduler.String
getStompBrokerRelayStatsInfo()
Get stats about STOMP broker relay (when using a full-featured STOMP broker).String
getStompSubProtocolStatsInfo()
Get stats about STOMP-related WebSocket message processing.String
getWebSocketSessionStatsInfo()
Get stats about WebSocket sessions.void
setInboundChannelExecutor(ThreadPoolTaskExecutor inboundChannelExecutor)
void
setLoggingPeriod(long period)
Set the frequency for logging information at INFO level in milliseconds.void
setOutboundChannelExecutor(ThreadPoolTaskExecutor outboundChannelExecutor)
void
setSockJsTaskScheduler(ThreadPoolTaskScheduler sockJsTaskScheduler)
void
setStompBrokerRelay(StompBrokerRelayMessageHandler stompBrokerRelay)
void
setSubProtocolWebSocketHandler(SubProtocolWebSocketHandler webSocketHandler)
String
toString()
构造器详细资料
WebSocketMessageBrokerStats
public WebSocketMessageBrokerStats()
方法详细资料
setSubProtocolWebSocketHandler
public void setSubProtocolWebSocketHandler(SubProtocolWebSocketHandler webSocketHandler)
setStompBrokerRelay
public void setStompBrokerRelay(StompBrokerRelayMessageHandler stompBrokerRelay)
setInboundChannelExecutor
public void setInboundChannelExecutor(ThreadPoolTaskExecutor inboundChannelExecutor)
setOutboundChannelExecutor
public void setOutboundChannelExecutor(ThreadPoolTaskExecutor outboundChannelExecutor)
setSockJsTaskScheduler
public void setSockJsTaskScheduler(ThreadPoolTaskScheduler sockJsTaskScheduler)
setLoggingPeriod
public void setLoggingPeriod(long period)
Set the frequency for logging information at INFO level in milliseconds. If set 0 or less than 0, the logging task is cancelled.By default this property is set to 30 minutes (30 * 60 * 1000).
getLoggingPeriod
public long getLoggingPeriod()
Return the configured logging period frequency in milliseconds.
getWebSocketSessionStatsInfo
public String getWebSocketSessionStatsInfo()
Get stats about WebSocket sessions.
getStompSubProtocolStatsInfo
public String getStompSubProtocolStatsInfo()
Get stats about STOMP-related WebSocket message processing.
getStompBrokerRelayStatsInfo
public String getStompBrokerRelayStatsInfo()
Get stats about STOMP broker relay (when using a full-featured STOMP broker).
getClientInboundExecutorStatsInfo
public String getClientInboundExecutorStatsInfo()
Get stats about the executor processing incoming messages from WebSocket clients.
getClientOutboundExecutorStatsInfo
public String getClientOutboundExecutorStatsInfo()
Get stats about the executor processing outgoing messages to WebSocket clients.
getSockJsTaskSchedulerStatsInfo
public String getSockJsTaskSchedulerStatsInfo()
Get stats about the SockJS task scheduler.