All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.client.EventsRequest Maven / Gradle / Ivy

/*
 * Copyright 2022 IBM All Rights Reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package org.hyperledger.fabric.client;

import java.util.function.UnaryOperator;

import io.grpc.CallOptions;

/**
 * A Fabric Gateway call to obtain events.
 * @param  The type of events obtained by this request.
 */
public interface EventsRequest extends Signable {
    /**
     * Get events. The Java gRPC implementation may not begin reading events until the first use of the returned
     * iterator.
     * 

Note that the returned iterator may throw {@link GatewayRuntimeException} during iteration if a gRPC * connection error occurs.

* @return Ordered sequence of events. */ default CloseableIterator getEvents() { return getEvents(GatewayUtils.asCallOptions()); } /** * Get events. The Java gRPC implementation may not begin reading events until the first use of the returned * iterator. *

Note that the returned iterator may throw {@link GatewayRuntimeException} during iteration if a gRPC * connection error occurs.

* @param options Function that transforms call options. * @return Ordered sequence of events. */ CloseableIterator getEvents(UnaryOperator options); /** * Get events. The Java gRPC implementation may not begin reading events until the first use of the returned * iterator. *

Note that the returned iterator may throw {@link GatewayRuntimeException} during iteration if a gRPC * connection error occurs.

* @param options Call options. * @return Ordered sequence of events. * @deprecated Replaced by {@link #getEvents(UnaryOperator)}. */ @Deprecated default CloseableIterator getEvents(CallOption... options) { return getEvents(GatewayUtils.asCallOptions(options)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy