clients/java: SDK methods for AcknowledgeAlarm + QueryActiveAlarms (PR E.5) #109
Reference in New Issue
Block a user
Delete Branch "track-e5-java-alarm-sdk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Tenth PR of the alarms-over-gateway epic (docs/plans/alarms-over-gateway.md). Mirrors PR E.2's .NET surface on the Java SDK. Depends on PR E.1 (#105, merged).
MxGatewayClient.acknowledgeAlarm— blocking unary call, validates protocol status via the existingMxGatewayErrorshelper. WrapsRuntimeExceptionthroughMxGatewayErrors.fromGrpcfor typed failure mapping.MxGatewayClient.acknowledgeAlarmAsync— CompletableFuture variant using the future stub.MxGatewayClient.queryActiveAlarms— async server-streaming RPC observed via a newMxGatewayActiveAlarmsSubscriptionhandle (parallel toMxGatewayEventSubscription; the existing subscription class is hard-typed toMxEventso a parallel type was simpler than retrofitting generics).MxGatewayClientVersionbumpsGATEWAY_PROTOCOL_VERSION2 → 3 to match the .NET contract; CLI version-string assertions updated.Test plan
mxgateway-client+mxgateway-cli)Dedicated
AlarmsApiTesttests (synthetic stub gRPC server) deferred to a follow-up — the Java SDK pattern relies on Gradle protobuf-plugin codegen rather than hand-written fakes; protocol coverage already lands via the regenerated proto types and the existingMxGatewayClientTestsintegration scaffolding.