public class WebSocketMessageBrokerStats
extends java.lang.Object
@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
.
Constructor and Description |
---|
WebSocketMessageBrokerStats() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClientInboundExecutorStatsInfo()
Get stats about the executor processing incoming messages from WebSocket clients.
|
java.lang.String |
getClientOutboundExecutorStatsInfo()
Get stats about the executor processing outgoing messages to WebSocket clients.
|
long |
getLoggingPeriod()
Return the configured logging period frequency in milliseconds.
|
java.lang.String |
getSockJsTaskSchedulerStatsInfo()
Get stats about the SockJS task scheduler.
|
java.lang.String |
getStompBrokerRelayStatsInfo()
Get stats about STOMP broker relay (when using a full-featured STOMP broker).
|
java.lang.String |
getStompSubProtocolStatsInfo()
Get stats about STOMP-related WebSocket message processing.
|
java.lang.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) |
java.lang.String |
toString() |
public void setSubProtocolWebSocketHandler(SubProtocolWebSocketHandler webSocketHandler)
public void setStompBrokerRelay(StompBrokerRelayMessageHandler stompBrokerRelay)
public void setInboundChannelExecutor(ThreadPoolTaskExecutor inboundChannelExecutor)
public void setOutboundChannelExecutor(ThreadPoolTaskExecutor outboundChannelExecutor)
public void setSockJsTaskScheduler(ThreadPoolTaskScheduler sockJsTaskScheduler)
public void setLoggingPeriod(long period)
By default this property is set to 30 minutes (30 * 60 * 1000).
public long getLoggingPeriod()
public java.lang.String getWebSocketSessionStatsInfo()
public java.lang.String getStompSubProtocolStatsInfo()
public java.lang.String getStompBrokerRelayStatsInfo()
public java.lang.String getClientInboundExecutorStatsInfo()
public java.lang.String getClientOutboundExecutorStatsInfo()
public java.lang.String getSockJsTaskSchedulerStatsInfo()
public java.lang.String toString()
toString
in class java.lang.Object