public class WebSocketMessageBrokerStats extends Object
@EnableWebSocketMessageBroker
for Java config and
<websocket:message-broker>
for XML.
By default aggregated information is logged every 15 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 |
---|---|
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() |
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 String getWebSocketSessionStatsInfo()
public String getStompSubProtocolStatsInfo()
public String getStompBrokerRelayStatsInfo()
public String getClientInboundExecutorStatsInfo()
public String getClientOutboundExecutorStatsInfo()
public String getSockJsTaskSchedulerStatsInfo()