IN - Type of PubSubSink to create.public static class PubSubSink.PubSubSinkBuilder<IN> extends Object implements PubSubSink.ProjectNameBuilder<IN>, PubSubSink.TopicNameBuilder<IN>
| 限定符和类型 | 方法和说明 |
|---|---|
PubSubSink<IN> |
build()
Actually builder the desired instance of the PubSubSink.
|
PubSubSink.PubSubSinkBuilder<IN> |
withCredentials(com.google.auth.Credentials credentials)
Set the credentials.
|
PubSubSink.PubSubSinkBuilder<IN> |
withHostAndPortForEmulator(String hostAndPort)
Set the custom hostname/port combination of PubSub.
|
PubSubSink.TopicNameBuilder<IN> |
withProjectName(String projectName)
Set the project name of the subscription to pull messages from.
|
PubSubSink.PubSubSinkBuilder<IN> |
withTopicName(String topicName)
Set the subscription name of the subscription to pull messages from.
|
public PubSubSink.PubSubSinkBuilder<IN> withCredentials(com.google.auth.Credentials credentials)
credentials - the Credentials needed to connect.public PubSubSink.TopicNameBuilder<IN> withProjectName(String projectName)
PubSubSink.ProjectNameBuilderwithProjectName 在接口中 PubSubSink.ProjectNameBuilder<IN>public PubSubSink.PubSubSinkBuilder<IN> withTopicName(String topicName)
PubSubSink.TopicNameBuilderwithTopicName 在接口中 PubSubSink.TopicNameBuilder<IN>public PubSubSink.PubSubSinkBuilder<IN> withHostAndPortForEmulator(String hostAndPort)
hostAndPort - The combination of hostname and port to connect to ("hostname:1234")public PubSubSink<IN> build() throws IOException
IOException - in case of a problem getting the credentialsIllegalArgumentException - in case required fields were not specified.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.