@Override public void close() { this.running = false; LOG.info("Closing source"); if (client != null) { // client seems to be thread-safe client.stop(); } // leave main method synchronized (waitLock) { waitLock.notify(); } }
@Override public void stop() { stop(DEFAULT_STOP_TIMEOUT_MILLIS); }
controller.addUser(t4jClient.getStreamId(), 987765L); client.stop();
client.stop();
client.stop();
void destroy() { if (client != null) { client.stop(); } } }
@Override public void close() { if (client != null) { client.stop(); } }
@Override public void close() { this.running = false; LOG.info("Closing source"); if (client != null) { // client seems to be thread-safe client.stop(); } // leave main method synchronized (waitLock) { waitLock.notify(); } }
@Override public void close() throws TexeraException { if (cursor == CLOSED) { return; } twitterConnector.getClient().stop(); cursor = CLOSED; }
@PreDestroy public void destroy() { this.t4jClient.stop(); this.client.stop(); this.executorService.shutdown(); }
public void run() { while (!client.isDone()) { try { String msg = msgQueue.take(); Utils.printInfo(new JSONObject(msg)); } catch (InterruptedException e) { e.printStackTrace(); } } client.stop(); } }
public void run() { while (!client.isDone()) { try { String msg = msgQueue.take(); Utils.printInfo(new JSONObject(msg)); String text = Utils.getCleanText(new JSONObject(msg)); // Need to convert the text to a Tweet datastructure for the classifier to work String decision = classifier.discreteValue(new Tweet(text)); System.out.println("\t***Sentiment classification: " + decision); } catch (InterruptedException e) { e.printStackTrace(); } } client.stop(); } }
@After public void tearDown() throws Exception { twitterConnector.getClient().stop(); }
client.stop(); LOG.info("Twitter Streaming API connection closed"); LOG.info("Twitter FireHose Runner Thread ending");