Skip to content

2.1.0

Compare
Choose a tag to compare
@jcodagnone jcodagnone released this 18 Oct 00:26
· 136 commits to master since this release
1627cfc
  • bugfix: avoid using default charset and user locale
  • feature: Compliance Firehose 2.0 by Dennis Lloyd Jr
  final AtomicInteger counter = new AtomicInteger();
  final DefaultGnipFacade x = DefaultGnipFacade.createPowertrackV2Compliance(
                              authentication, 1);
  final GnipStream stream = x.createPowertrackStream(String.class)
      .withAccount("foo")
      .withType("prod")
      .withUnmarshall(new ComplianceActivityUnmarshaller())
      .withObserver(new StreamNotificationAdapter<Activity>() {
          @Override
          public void notify(final Activity activity, final GnipStream stream) {
              System.out.println(activity);
              if (counter.incrementAndGet() >= 10) {
                  stream.close();
              }
          }
      })
      .build();
  stream.await();