class ApplicationInactivityListener {

    @EventListener
    public void on(TopologyEvents.ApplicationInactivityTimeout evt) {
        String clientId = evt.clientId();
        String context = evt.clientStreamIdentification().getContext();
        streamClosers.forEach((connectionType, streamCloser) -> {
            Set<String> streamIds = clientIdRegistry.streamIdsFor(clientId, connectionType);
            for (String streamId : streamIds) {
                ClientStreamIdentification streamIdentification = new ClientStreamIdentification(context, streamId);
                streamCloser.forceDisconnection(clientId, streamIdentification);
            }
        });
    }

    @Autowired public  ApplicationInactivityListener(ClientIdRegistry clientIdRegistry,
                                         CommandService commandService,
                                         QueryService queryService);
    public  ApplicationInactivityListener(Map<ConnectionType, StreamCloser> streamClosers,
                                         ClientIdRegistry clientIdRegistry);

}