Class MxGatewayEventSubscription

java.lang.Object
com.zb.mom.ww.mxgateway.client.MxGatewayEventSubscription
All Implemented Interfaces:
AutoCloseable

public final class MxGatewayEventSubscription extends Object
Cancellable handle returned by the async streamEvents variant.

Wraps a caller-supplied StreamObserver and exposes a cancel() entry point that aborts the underlying gRPC call. The subscription also implements AutoCloseable so it can participate in try-with-resources blocks.

All lifecycle / cancellation behaviour is inherited from MxGatewayStreamSubscription (Client.Java-036).

  • Constructor Details

    • MxGatewayEventSubscription

      public MxGatewayEventSubscription()
  • Method Details

    • cancel

      public final void cancel()
      Cancels the underlying gRPC call. Safe to invoke before the call has started; cancellation is recorded and applied as soon as the stream attaches.
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable