@Test public void testClose() throws Exception { boolean result = this.weEventClient.close(topicName); Assert.assertTrue(result); }
@Override public boolean close(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/close?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<Boolean>>() { }).getData(); }
WeEventClient implements IWeEventClient { @Override public boolean close(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/close?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<Boolean>>() { }).getData(); } }
WeEventClient implements IWeEventClient { @Override public boolean close(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/close?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<Boolean>>() { }).getData(); } WeEventClient(String brokerUrl, String groupId, String userName, String password, int timeout); }
WeEventClient implements IWeEventClient { @Override public boolean close(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/close?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<Boolean>>() { }).getData(); } WeEventClient(String brokerUrl, String groupId, String userName, String password, int timeout); @Override boolean unSubscribe(String subscriptionId); @Override boolean open(String topic); @Override boolean close(String topic); @Override boolean exist(String topic); @Override TopicPage list(Integer pageIndex, Integer pageSize); @Override TopicInfo state(String topic); @Override WeEvent getEvent(String eventId); @Override SendResult publish(WeEvent weEvent); @Override CompletableFuture<SendResult> publishAsync(WeEvent weEvent); @Override String subscribe(String topic, String offset, Map<String, String> extension, @NonNull EventListener listener); @Override String subscribe(String[] topics, String offset, Map<String, String> extension, @NonNull EventListener listener); static SSLContext getSSLContext(); }
WeEventClient implements IWeEventClient { @Override public boolean close(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/close?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<Boolean>>() { }).getData(); } WeEventClient(String brokerUrl, String groupId, String userName, String password, int timeout); @Override boolean unSubscribe(String subscriptionId); @Override boolean open(String topic); @Override boolean close(String topic); @Override boolean exist(String topic); @Override TopicPage list(Integer pageIndex, Integer pageSize); @Override TopicInfo state(String topic); @Override WeEvent getEvent(String eventId); @Override SendResult publish(WeEvent weEvent); @Override CompletableFuture<SendResult> publishAsync(WeEvent weEvent); @Override String subscribe(String topic, String offset, Map<String, String> extension, @NonNull EventListener listener); @Override String subscribe(String[] topics, String offset, Map<String, String> extension, @NonNull EventListener listener); static SSLContext getSSLContext();  }