@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.
| Modifier and Type | Field and Description |
|---|---|
| private TaskExecutor | |
| private static final Log | |
| private long | |
| private ScheduledFuture | |
| private TaskExecutor | |
| private TaskScheduler | |
| private StompBrokerRelayMessageHandler | |
| private StompSubProtocolHandler | |
| private SubProtocolWebSocketHandler |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterSingletonsInstantiated()
Implements org. Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already. |
| public String | getClientInboundExecutorStatsInfo()
Get stats about the executor processing incoming messages from WebSocket clients. |
| public String | getClientOutboundExecutorStatsInfo()
Get stats about the executor processing outgoing messages to WebSocket clients. |
| private String | |
| public long | |
| public String | |
| public String | getStompBrokerRelayStatsInfo()
Get stats about STOMP broker relay (when using a full-featured STOMP broker). |
| public String | |
| public String | |
| private ScheduledFuture | |
| private StompSubProtocolHandler | |
| public void | |
| public void | setLoggingPeriod(long period)
Set the frequency for logging information at INFO level in milliseconds. |
| public void | |
| public void | |
| public void | |
| public void | |
| public String |
| inboundChannelExecutor | back to summary |
|---|---|
| private TaskExecutor inboundChannelExecutor
| |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| loggingPeriod | back to summary |
|---|---|
| private long loggingPeriod | |
| loggingTask | back to summary |
|---|---|
| private ScheduledFuture<?> loggingTask
| |
| outboundChannelExecutor | back to summary |
|---|---|
| private TaskExecutor outboundChannelExecutor
| |
| sockJsTaskScheduler | back to summary |
|---|---|
| private TaskScheduler sockJsTaskScheduler
| |
| stompBrokerRelay | back to summary |
|---|---|
| private StompBrokerRelayMessageHandler stompBrokerRelay
| |
| stompSubProtocolHandler | back to summary |
|---|---|
| private StompSubProtocolHandler stompSubProtocolHandler
| |
| webSocketHandler | back to summary |
|---|---|
| private SubProtocolWebSocketHandler webSocketHandler
| |
| WebSocketMessageBrokerStats | back to summary |
|---|---|
| public WebSocketMessageBrokerStats() | |
| afterSingletonsInstantiated | back to summary |
|---|---|
| public void afterSingletonsInstantiated() Implements org. Doc from org. Invoked right at the end of the singleton pre-instantiation phase,
with a guarantee that all regular singleton beans have been created
already. Note This callback won't be triggered for singleton beans
lazily initialized on demand after
| |
| getClientInboundExecutorStatsInfo | back to summary |
|---|---|
| public String getClientInboundExecutorStatsInfo() Get stats about the executor processing incoming messages from WebSocket clients. | |
| getClientOutboundExecutorStatsInfo | back to summary |
|---|---|
| public String getClientOutboundExecutorStatsInfo() Get stats about the executor processing outgoing messages to WebSocket clients. | |
| getExecutorStatsInfo | back to summary |
|---|---|
| private String getExecutorStatsInfo(Executor executor) | |
| getLoggingPeriod | back to summary |
|---|---|
| public long getLoggingPeriod() Return the configured logging period frequency in milliseconds. | |
| getSockJsTaskSchedulerStatsInfo | back to summary |
|---|---|
| public String getSockJsTaskSchedulerStatsInfo() Get stats about the SockJS task scheduler. | |
| getStompBrokerRelayStatsInfo | back to summary |
|---|---|
| public String getStompBrokerRelayStatsInfo() Get stats about STOMP broker relay (when using a full-featured STOMP broker). | |
| getStompSubProtocolStatsInfo | back to summary |
|---|---|
| public String getStompSubProtocolStatsInfo() Get stats about STOMP-related WebSocket message processing. | |
| getWebSocketSessionStatsInfo | back to summary |
|---|---|
| public String getWebSocketSessionStatsInfo() Get stats about WebSocket sessions. | |
| initLoggingTask | back to summary |
|---|---|
private ScheduledFuture
| |
| initStompSubProtocolHandler | back to summary |
|---|---|
private StompSubProtocolHandler initStompSubProtocolHandler()
| |
| setInboundChannelExecutor | back to summary |
|---|---|
| public void setInboundChannelExecutor(TaskExecutor inboundChannelExecutor) | |
| setLoggingPeriod | back to summary |
|---|---|
| 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). | |
| setOutboundChannelExecutor | back to summary |
|---|---|
| public void setOutboundChannelExecutor(TaskExecutor outboundChannelExecutor) | |
| setSockJsTaskScheduler | back to summary |
|---|---|
| public void setSockJsTaskScheduler(TaskScheduler sockJsTaskScheduler) | |
| setStompBrokerRelay | back to summary |
|---|---|
| public void setStompBrokerRelay(StompBrokerRelayMessageHandler stompBrokerRelay) | |
| setSubProtocolWebSocketHandler | back to summary |
|---|---|
| public void setSubProtocolWebSocketHandler(SubProtocolWebSocketHandler webSocketHandler) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |