justcount-java-client

Count massively from your Java application

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

io.justcount
ArtifactId

ArtifactId

justcount-java-client
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

justcount-java-client
Count massively from your Java application
Project URL

Project URL

http://github.com/justcount/justcount-java-client
Source Code Management

Source Code Management

https://github.com/justcount/justcount-java-client.git

Download justcount-java-client

How to add to project

<!-- https://jarcasting.com/artifacts/io.justcount/justcount-java-client/ -->
<dependency>
    <groupId>io.justcount</groupId>
    <artifactId>justcount-java-client</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.justcount/justcount-java-client/
implementation 'io.justcount:justcount-java-client:0.3.0'
// https://jarcasting.com/artifacts/io.justcount/justcount-java-client/
implementation ("io.justcount:justcount-java-client:0.3.0")
'io.justcount:justcount-java-client:jar:0.3.0'
<dependency org="io.justcount" name="justcount-java-client" rev="0.3.0">
  <artifact name="justcount-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.justcount', module='justcount-java-client', version='0.3.0')
)
libraryDependencies += "io.justcount" % "justcount-java-client" % "0.3.0"
[io.justcount/justcount-java-client "0.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.google.cloud : google-cloud-pubsub jar 1.31.0
com.google.code.gson : gson jar 2.8.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.
PubSubClient.Options clientOptions = new PubSubClient.Options("/path/to/pubsub-pubconsumer.json");
PubSubClient client = new PubSubClient(clientOptions);
Operation[] operations = {
        Operation.Builder.AddInt(Metric.from("testRealm:testBackend:testMetric"), 1)
                .setParam("testParam", "testParamValue")
                .build(),
};
ApiFuture<Boolean> sendFuture = client.send(operations);
ApiFutures.addCallback(sendFuture, new ApiFutureCallback<Boolean>() {
    public void onFailure(Throwable throwable) {
        System.out.println("Send error "+throwable.toString());
    }

    public void onSuccess(Boolean aBoolean) {
        System.out.println("Sent success: " + (aBoolean ? "true" : "false"));
    }
});
ApiFuture<Boolean> closeFuture = client.close();
ApiFutures.addCallback(closeFuture, new ApiFutureCallback<Boolean>() {
    public void onFailure(Throwable throwable) {
        System.out.println("Close error "+throwable.toString());
    }

    public void onSuccess(Boolean aBoolean) {
        System.out.println("Close success: " + (aBoolean ? "true" : "false"));
    }
});
closeFuture.get();
io.justcount

JustCount.io

Count massive volumes, in real time!

Versions

Version
0.3.0