Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public clsas YouTrackReceiver implements IReceiver{
- private WebClient client;
- private BlockingQueue<JsonNode> receivedEventData;
- private final String url = "https://youtrack.jetbrains.com/api"
- public YouTrackReceiver(BlockingQueue<JsonNode> receivedEventData){
- // Объявляем HTTP клиент для взаимодействия с API по заданному URL
- receivedEventData = receivedEventData;
- HttpClient httpClient = HttpClient.create();
- client = WebClient.builder()
- .clientConnector(new ReactorClientHttpConnector(httpClient))
- .baseUrl(url)
- .defaultHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON_VALUE)
- .build();
- }
- public void receive() {
- // Асинхронно вызываем методы опроса ресурсов API
- receiveIssueCreatedActivities();
- receiveIssueResolvedActivities();
- receiveCommentActivities();
- receiveCommentAttachmentActivities();
- receiveTimeTrackActivities();
- }
- }
Add Comment
Please, Sign In to add comment