Package com.salesforce.eventbus.protobuf
Class PubSubGrpc.PubSubFutureStub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractFutureStub<PubSubGrpc.PubSubFutureStub>
com.salesforce.eventbus.protobuf.PubSubGrpc.PubSubFutureStub
- Enclosing class:
- PubSubGrpc
public static final class PubSubGrpc.PubSubFutureStub
extends io.grpc.stub.AbstractFutureStub<PubSubGrpc.PubSubFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service PubSub.
The Pub/Sub API provides a single interface for publishing and subscribing to platform events, including real-time event monitoring events, and change data capture events. The Pub/Sub API is a gRPC API that is based on HTTP/2. A session token is needed to authenticate. Any of the Salesforce supported OAuth flows can be used to obtain a session token: https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_flows.htm&type=5 For each RPC, a client needs to pass authentication information as metadata headers (https://www.grpc.io/docs/guides/concepts/#metadata) with their method call. For Salesforce session token authentication, use: accesstoken : access token instanceurl : Salesforce instance URL tenantid : tenant/org id of the client StatusException is thrown in case of response failure for any request.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
-
Method Summary
Modifier and TypeMethodDescriptionprotected PubSubGrpc.PubSubFutureStub
build
(io.grpc.Channel channel, io.grpc.CallOptions callOptions) com.google.common.util.concurrent.ListenableFuture<SchemaInfo>
getSchema
(SchemaRequest request) Get the event schema for a topic based on a schema ID.com.google.common.util.concurrent.ListenableFuture<TopicInfo>
getTopic
(TopicRequest request) Get the topic Information related to the specified topic.com.google.common.util.concurrent.ListenableFuture<PublishResponse>
publish
(PublishRequest request) Send a publish request to synchronously publish events to a topic.Methods inherited from class io.grpc.stub.AbstractFutureStub
newStub, newStub
Methods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
-
Method Details
-
build
protected PubSubGrpc.PubSubFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
build
in classio.grpc.stub.AbstractStub<PubSubGrpc.PubSubFutureStub>
-
getSchema
public com.google.common.util.concurrent.ListenableFuture<SchemaInfo> getSchema(SchemaRequest request) Get the event schema for a topic based on a schema ID.
-
getTopic
Get the topic Information related to the specified topic.
-
publish
public com.google.common.util.concurrent.ListenableFuture<PublishResponse> publish(PublishRequest request) Send a publish request to synchronously publish events to a topic.
-