Class WebSocketMessageBrokerStats
java.lang.Object
org.springframework.web.socket.config.WebSocketMessageBrokerStats
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
.
- Since:
- 4.1
- Author:
- Rossen Stoyanchev, Sam Brannen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet stats about the executor processing incoming messages from WebSocket clients.Get stats about the executor processing outgoing messages to WebSocket clients.long
Return the configured logging period frequency in milliseconds.Get stats about the SockJS task scheduler.Get stats about STOMP broker relay (when using a full-featured STOMP broker).Get stats about STOMP-related WebSocket message processing.Get stats about WebSocket sessions.void
setInboundChannelExecutor
(TaskExecutor inboundChannelExecutor) void
setLoggingPeriod
(long period) Set the frequency for logging information at INFO level in milliseconds.void
setOutboundChannelExecutor
(TaskExecutor outboundChannelExecutor) void
setSockJsTaskScheduler
(TaskScheduler sockJsTaskScheduler) void
setStompBrokerRelay
(StompBrokerRelayMessageHandler stompBrokerRelay) void
setSubProtocolWebSocketHandler
(SubProtocolWebSocketHandler webSocketHandler) toString()
-
Constructor Details
-
WebSocketMessageBrokerStats
public WebSocketMessageBrokerStats()
-
-
Method Details
-
setSubProtocolWebSocketHandler
-
setStompBrokerRelay
-
setInboundChannelExecutor
-
setOutboundChannelExecutor
-
setSockJsTaskScheduler
-
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
Get stats about WebSocket sessions. -
getStompSubProtocolStatsInfo
Get stats about STOMP-related WebSocket message processing. -
getStompBrokerRelayStatsInfo
Get stats about STOMP broker relay (when using a full-featured STOMP broker). -
getClientInboundExecutorStatsInfo
Get stats about the executor processing incoming messages from WebSocket clients. -
getClientOutboundExecutorStatsInfo
Get stats about the executor processing outgoing messages to WebSocket clients. -
getSockJsTaskSchedulerStatsInfo
Get stats about the SockJS task scheduler. -
toString
-