ChirpStack gRPC API message and service wrappers for Java.
- publish java package to maven central: https://docs.github.com/en/actions/language-and-framework-guides/publishing-java-packages-with-maven
An artifact is not yet public on Maven Central, you have build your own jar with
make java-current-userat the end the build process, the .jar artifact will be installed on your Local Maven Repository $HOME/.m2
All messages, services, constants, etc. are auto-generated from the ChirpStack protobuf definitions. The result is that this package structure matches that of the protobuf definitions.
The protobuf definitions can be found here: https://github.com/brocaar/chirpstack-api/tree/master/protobuf
Maven dependencies.
NOTE: for chirpstack-api you have to follow Install instructions
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.chirpstack</groupId>
<artifactId>chirpstack-api</artifactId>
<version>3.12.4</version>
</dependency>private static void login() {
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 8080)
.build();
InternalServiceGrpc.InternalServiceBlockingStub stub = InternalServiceGrpc.newBlockingStub(channel);
Internal.LoginRequest loginRequest = Internal.LoginRequest.newBuilder()
.setEmail("user")
.setPassword("password")
.build();
Internal.LoginResponse loginResponse = stub.login(loginRequest);
String token = loginResponse.getJwt();
logger.info("token={}", token);
channel.shutdown();
}