IN
- Type of PubSubSink to create.public static class PubSubSink.PubSubSinkBuilder<IN> extends Object implements PubSubSink.ProjectNameBuilder<IN>, PubSubSink.TopicNameBuilder<IN>
Modifier and Type | Method and Description |
---|---|
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.ProjectNameBuilder
withProjectName
in interface PubSubSink.ProjectNameBuilder<IN>
public PubSubSink.PubSubSinkBuilder<IN> withTopicName(String topicName)
PubSubSink.TopicNameBuilder
withTopicName
in interface 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.