@Inject private void configureUnSubscribeHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:ws-agent-output:un-subscribe") .paramsAsString() .noResult() .withBiConsumer( (endpointId, workspaceId) -> { endpointIds.getOrDefault(endpointId, emptySet()).remove(workspaceId); endpointIds.entrySet().removeIf(entry -> entry.getValue().isEmpty()); }); }
@Inject private void configureUnSubscribeHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:environment-output:un-subscribe-by-machine-name") .paramsAsString() .noResult() .withBiConsumer( (endpointId, workspaceIdPlusMachineName) -> { endpointIds.getOrDefault(endpointId, emptySet()).remove(workspaceIdPlusMachineName); endpointIds.entrySet().removeIf(entry -> entry.getValue().isEmpty()); }); }
private void handleProgressesReports() { configurator .newConfiguration() .methodName(PROGRESS_REPORT_METHOD) .paramsAsDto(ProgressReport.class) .noResult() .withConsumer( progressNotification -> progressReportConsumers.forEach(it -> it.accept(progressNotification))); } }
@Inject private void configureSubscribeHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:ws-agent-output:subscribe") .paramsAsString() .noResult() .withBiConsumer( (endpointId, workspaceId) -> { endpointIds.putIfAbsent(endpointId, newConcurrentHashSet()); endpointIds.get(endpointId).add(workspaceId); }); }
@Inject private void configureSubscribeHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:environment-output:subscribe-by-machine-name") .paramsAsString() .noResult() .withBiConsumer( (endpointId, workspaceIdPlusMachineName) -> { endpointIds.putIfAbsent(endpointId, newConcurrentHashSet()); endpointIds.get(endpointId).add(workspaceIdPlusMachineName); }); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("connected") .paramsAsDto(ConnectedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject private void configureTestDetectionHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(Constants.TESTING_RPC_TEST_DETECTION_NAME) .paramsAsDto(TestDetectionContext.class) .resultAsDto(TestDetectionResult.class) .withBiFunction(this::handleTestDetection); }
@Inject private void configureUnSubscribeHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(EVENT_DEBUGGER_UN_SUBSCRIBE) .noParams() .noResult() .withConsumer(endpointIds::remove); } }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(INCOMING_METHOD) .noParams() .noResult() .withConsumer(endpointIds::add); }
@Inject private void configureHandler(RequestHandlerConfigurator requestHandlerConfigurator) { requestHandlerConfigurator .newConfiguration() .methodName("websocketIdService/getId") .noParams() .resultAsString() .withFunction(this::extractClientId); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_started") .paramsAsDto(ProcessStartedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_died") .paramsAsDto(ProcessDiedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject private void configureHandlers(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(WORKSPACE_SYNCHRONIZE_METHOD_NAME) .noParams() .noResult() .withConsumer(this::updateProjects); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event/project-tree-state-changed") .paramsAsDto(ProjectTreeStateUpdateDto.class) .noResult() .withConsumer(projectTreeChangeHandler::handleFileChange); } }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:file-state-changed") .paramsAsDto(FileStateUpdateDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(WORKING_COPY_ERROR_METHOD) .paramsAsDto(ServerError.class) .noResult() .withConsumer(this::onError); }
@Inject private void configureUnSubscribeHandler(RequestHandlerConfigurator requestHandler) { requestHandler .newConfiguration() .methodName("window/showMessage/unsubscribe") .noParams() .noResult() .withConsumer(endpointIds::remove); }
@Inject private void configureShowMessageRequestSubscribeHandler( RequestHandlerConfigurator requestHandler) { requestHandler .newConfiguration() .methodName("window/showMessageRequest/subscribe") .noParams() .noResult() .withConsumer(showMessageRequestEndpointIds::add); }
@Inject private void configureRunTestHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(Constants.RUN_TESTS_METHOD) .paramsAsDto(TestExecutionContext.class) .resultAsDto(TestLaunchResult.class) .withBiFunction(this::runTests); }
@Inject private void configureReceiver(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(NOTIFY) .paramsAsDto(ExecuteCommandParams.class) .noResult() .withConsumer(this::handleNotification); }