package com.zb.mom.ww.mxgateway.client;

import io.grpc.stub.StreamObserver;
import mxaccess_gateway.v1.MxaccessGateway.MxEvent;
import mxaccess_gateway.v1.MxaccessGateway.StreamEventsRequest;

/**
 * Cancellable handle returned by the async {@code streamEvents} variant.
 *
 * <p>Wraps a caller-supplied {@link StreamObserver} and exposes a
 * {@link #cancel()} entry point that aborts the underlying gRPC call. The
 * subscription also implements {@link AutoCloseable} so it can participate in
 * try-with-resources blocks.
 *
 * <p>All lifecycle / cancellation behaviour is inherited from
 * {@link MxGatewayStreamSubscription} (Client.Java-036).
 */
public final class MxGatewayEventSubscription
        extends MxGatewayStreamSubscription<StreamEventsRequest, MxEvent> {
    public MxGatewayEventSubscription() {
        super("client cancelled event stream");
    }
}
